tags:

views:

39

answers:

1

Hello all,

I know that ID and NAME should be unique to a page.

however, I would like to know whether or not it is valid to use a same ID and NAME on different pages.

For example:

<img alt="" src="images/shadow.png" id="shadow" name="shadow"/>

Whether or not it is valid to include this statement to all pages?

Thank you

+5  A: 

this is fine. it only has to be unique to a page

ooo
Only ID needs to be unique :)
Marko
Nope, name also should be unique.
ppshein
No they don't, think of radio button sets.
Marko
Old browsers such as Netscape 4.x do not support ID link destinations. Authors can maintain accessibility in old browsers by continuing to use A NAME instead of or in addition to ID.NAME and ID values must be unique in any document, and different values must differ by more than just the case. ID values must begin with a letter in the range A-Z or a-z, and may be followed by A-Z, a-z, 0-9, hyphens, underscores, colons, or periods. When linking to a named anchor, the name is treated as case sensitive.(html 4 spec)
edelwater
Hello all,In fact, my question is regarding the unique on all pages not just on one page.Thank you
q0987