The id attribute’s value must be unique

The id attribute is used to give an HTML element a unique name. That name has several uses:

The value of each id attribute must be unique in a document. An easy way to check that your HTML document does not contain multiple occurrences of the same id value is to run it through W3C’s HTML Validator.

This post is a Quick Tip. Background info is available in Quick Tips for web developers and web designers.

Posted on December 8, 2008 in Quick Tips, (X)HTML