q0987
q0987

Reputation: 35982

HTML - Can I use a same ID and NAME on two different web page?

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

Upvotes: 2

Views: 1967

Answers (1)

leora
leora

Reputation: 196459

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

Upvotes: 9

Related Questions