|  | Posted by Beauregard T. Shagnasty on 08/14/07 13:45 
Richard wrote:
 > I discovered some of the problem:  The W3C Markup Validator flagged
 > two errors,  both caused by my code conflicting with the DTD I
 > specified. The Validator said:
 >
 > <quote>
 > Line 14, Column 11: there is no attribute "NAME".
 >
 > 		<h2 name="_Dummy1">_Dummy1</h2>
 
 ...which is correct.
 
 > The DTD I had used was:
 >     <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
 >     "http://www.w3.org/TR/html4/strict.dtd">
 
 ...which you should use for new pages...
 
 > I found the Transitional DTD at http://www.w3.org/TR/html401/loose.dtd,
 > which I am now using:
 >     <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 >     "http://www.w3.org/TR/html4/loose.dtd">
 
 ...and shouldn't, as you are not Transitioning from an old legacy page.
 
 > The validator still gives me:
 > <quote>
 > Line 14, Column 11: there is no attribute "NAME".
 > </quote>
 
 ...which is correct, because there still is no attribute "name" for <h2>
 
 > But I got this "name" attribute from http://www.w3schools.com/html/html_links.asp,
 > where it claims:
 > <quote>
 > <a name="tips">Useful Tips Section</a>
 
 Note that the name attribute is used on an anchor, not a heading.
 
 > To link directly to the "tips" section, add a # sign and the name of
 > the anchor to the end of a URL, like this:
 > <quote>
 > <a href="http://www.w3schools.com/html_links.asp#tips">Jump to the
 > Useful Tips Section</a>
 > [snip]
 > <a href="#tips">Jump to the Useful Tips Section</a>
 > </quote>
 >
 > Is this W3Schools stuff outdated?
 
 While some parts of W3Schools are misleading and erroneous, they seem to
 be correct in this instance.
 
 >  Any other suggestions?
 
 See my other post.
 
 --
 -bts
 -Motorcycles defy gravity; cars just suck
  Navigation: [Reply to this message] |