I have a few questions about the name attributes and href referencing
to. Can you declare name attributes for tags other than anchor
elements (like div or h2)? The validator keeps returning the following
error for HTML 4.0 strict .
Line 139, column 12: there is no attribute "NAME"
<h2 name="heading">H2 Headline </h2>
| 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), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).
My goal is to create hot links to specific sections of the document.
This objective does not refer to documents outside the current
document covered by traditional anchor elements (href). One developer
suggested that you could replace the following.
<a name="heading"></a>
<h2 name="heading">H2 Headline </h2>
So I made the changes and discovered that these changes did not
validate. This discovery happens after sometime away from the document
in question. Upon revisiting the document, the errors left me
perplexed and at odds. A quick Google search only led me to
descriptions about traditional anchors and the name attributes. These
results did not mention name attributes in other elements. Maybe, I
did not remember the correct term for hot links within a document.
Does anybody have any links that explain what I call hot links? Does
this scenario only occur in HTML 4.0 (and not xHTML)? Please give a
brief description of this topic if appropriate.