Quote:
Originally Posted by CoolKay
you can not repeat divisions ids on a page (the validator will not let you) - you can however repeat section ids on a page.
|
What you say makes no sense. An ID must be unique, regardless of the element it’s assigned to.
This is a division element:
and you can have as many as you like.
This is a division with an ID attribute:
Code:
<div id="example"></div>
You can have more divisions in the document but not the same ID.
This is allowed:
Code:
<div id="example1"></div>
<div id="example2"></div>
<div id="another_example_ID"></div>
This is not allowed:
Code:
<div id="example"></div>
<div id="example"></div>
<div id="example"></div>
… and neither is it allowed with section elements (or
any element).
If there are multiple divisions that are supposed to be named alike then assign a
class to them. This is allowed at all times, and, again, on any element:
Code:
<div class="example"></div>
<div class="example"></div>
<div class="example"></div>