The id attribute of an HTML tag can be used distinctively to identify or recognize any element within an HTML page.
Features of Id Attribute:
1. If an element carries an id attribute as a unique identifier, it is possible to identify or point out just that element and its content.
2. If you have two elements of the same name within a Web page (or style sheet), the attribute can be used to differentiate between elements that have the same name.
Example
<p id="java">This paragraph explains what is JAVA</p>
<p id="jquery">This paragraph explains what is JQUERY</p>
1. If an element carries an id attribute as a unique identifier, it is possible to identify or point out just that element and its content.
2. If you have two elements of the same name within a Web page (or style sheet), the attribute can be used to differentiate between elements that have the same name.
Example
<p id="java">This paragraph explains what is JAVA</p>
<p id="jquery">This paragraph explains what is JQUERY</p>
No comments:
Post a comment