Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Name attribute questions

Status
Not open for further replies.

gohankid77

Technical User
Jun 28, 2004
65
US
In XHTML 1.1, wasn't the NAME attribute supposed to be completely replaced by the ID attribute? Yet, the NAME attribute is still present in some tags:

<object>
<param>
<input>
<select>
<textarea>
<button>

There might be more. I don't know why, but it seems the W3C somehow forgot that rule. Hmm................
 
I believe it's still there to offer backwards compatibility with older browsers
 

AFAIK the NAME attribute is still valid markup in XHTML 1.1... Admittedly, I haven't checked the specs, but pages I've got that are Strict 1.1 compliant don't fail any validation, so I can only assume that to be the case.

Where did you hear that is was going to be removed? I'd be interested to read the article.

Hope this helps,
Dan

 
See XHTML 1.1 (as a module-based XHTML 1.0 Strict):

See also Modularization of XHTML:

From 1st source (Changes from XHTML 1.0 Strict):
Code:
On the a and map elements,
the name attribute has been removed
in favor of the id attribute 
(as defined in [XHTMLMOD [p.13] ]).
 

So rather than being "completely replaced", it's more a case of "it's been changed on only 2 elements"... That's good - I was worrying that all my compliant pages with NAME attributes on input tags were suddenly going to break!

Dan
 
Sorry for the confusion everybody. Thank you all for your input. [peace]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top