www.webdeveloper.com
Results 1 to 7 of 7

Thread: [RESOLVED] Substitute for 'name' in HTML5 validation?

Threaded View

  1. #1
    Join Date
    Dec 2005
    Location
    FL
    Posts
    7,373

    resolved [RESOLVED] Substitute for 'name' in HTML5 validation?

    I received an error in the w3.org ( http://validator.w3.org/ ) validator.

    I was using the following code...
    Code:
    <!DOCTYPE HTML>
    <html>
    <head>
    <title> Untitled </title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    
    </head>
    <body>
    
    <a name="TOP"></a>
    
    <h1> Table of Contents </h1>
    <!-- Long section display here -->
    <a href="#TOP">Go to Top</a>
    
    <h1> Section start </h1>
    <!-- Long section display here -->
    <a href="#TOP">Go to Top</a>
    
    <!-- etc. -->
    
    </body>
    </html>
    But I get a warning error that use of "name" is deprecated and that I should use 'id' instead.

    What is the substitute code for the above when the page is longer than the screen
    and I want to allow the user a quick link to the top of the page where I might have a table of contents?

    Note: Extra test.
    I just tried putting a radio button into the code and the validator complained again that 'name' is obsolete.
    There are no errors and it passed the success message.
    I'm just trying to figure out what to use of this type of coding to eliminate all validator messages!
    Last edited by JMRKER; 04-19-2013 at 02:44 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles