HTML Id Attributes
Example: In this example, we simply style the element with id “geeks”.
Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML course.
Note: This is a global attribute, it can be used in all the tags.
Note: In HTML5, id attributes can be used by any HTML tag but in HTML 4.01 there are some restriction to use id attributes. It can not be used by <base>, <head>, <html>, <meta>, <param>, <script>, <style>, and <title> tag. In HTML4.01 id can not start with number.
- Google Chrome
- Edge 12 and above
- Firefox 32 and above
- Internet Explorer