HTML: Display:none does this allow multiple ID-Attributes with same name (when "hidden")?

Posted by Jan on Stack Overflow See other posts from Stack Overflow or by Jan
Published on 2010-04-01T14:42:59Z Indexed on 2010/04/01 15:13 UTC
Read the original article Hit count: 253

Filed under:

Hello,

according to the HTML Standards ID-Attributes of any HTML Tag in a webpage have to be unique in the document!?

Does this rule also apply to HTML Tags that have been "disabled/hidden" by using: display:none?

Example:

<html>
<body>
<div id="one"></div>
<div id="one" style="display:none;"></div>
</body>
</hmtl>

Is this valid HTML or not. So the question is do "display:none"= hidden Elements also "count/matter" in regard to the rule only having unique ID-Attributes in a single webpage?

Thanks Jan

© Stack Overflow or respective owner

Related posts about html