|
Posted by Jonathan N. Little on 08/14/07 13:39
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>
That is correct you want the parameter ID not NAME
<h2 id="_Dummy1">_Dummy1</h2>
then a link <a href="#_Dummy1">To _Dummy1</a> would work...
>
> You have used the attribute named above in your document, but the
> document type you are using does not support that attribute for this
> element. This error is often caused by incorrect use of the "Strict"
> document type with a document that uses frames (e.g. you must use the
> "Transitional" document type to get the "target" attribute)
> </quote>
>
> The DTD I had used was:
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
> "http://www.w3.org/TR/html4/strict.dtd">
>
>
> 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">
>
Bad idea, this is an new page you should fix the error, not *down-grade*
the doctype.
> The validator still gives me:
> <quote>
> Line 14, Column 11: there is no attribute "NAME".
> </quote>
>
> 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>
>
> You should notice that a named anchor is not displayed in a special
> way.
>
> 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? Any other suggestions?
>
W3Schools site is notoriously full of incorrect information. Too bad
many are fooled into think that have some affiliation or legitimacy
because of the "W3" in their domain name. I have found www.htmldog.com
information bay far more accurate.
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Navigation:
[Reply to this message]
|