The id attribute specifies a unique id for an HTML element (the value must be unique within the HTML document).
The id attribute is most used to point to a style in a style sheet, and by JavaScript (via the HTML DOM (Document Object Model) to manipulate the element with the specific id.
In HTML5, the id attribute can be used on any HTML element (it will validate on any HTML element. However, it is not necessarily useful).
Specifies a unique id for the element.
Naming rules:
Must contain at least one character.
Must not contain any space characters.
In HTML, all values are case-insensitive.
Login in to like
Login in to comment