CSS ID Selector
Structure
element1#idname
#idname
#idname#idname
Description
The ID selector selects elements that have and id-attribute with a specific value. To select an ID, you add a # to the beginning of the id-name. Important: an ID can only be used once in a specific html/xml file (of course, you can use it in separate files) - that's the difference between an ID and class.
Examples
Compatibility
Chrome | Firefox | Internet Explorer | Opera | Safari |
---|---|---|---|---|
Any | Any | Any | Any | Any |