ID selector is an individually
identified (named) selector to which a specific style is declared. Using the ID
attribute the declared style can then be associated with one and only one HTML
element per document as to differentiate it from all other elements. ID
selectors are created by a character # followed by the selector's name. The
name can contain characters a-z, A-Z, digits 0-9, period, hyphen, escaped
characters, Unicode characters 161-255, as well as any Unicode character as a
numeric code; however, they cannot start with a dash or a digit.
#abc123 {color: red; background:
black}
<P ID=abc123>
This and only this element can be
identified as abc123
</P>
Join MindStick Community
You need to log in or register to vote on answers or questions.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
ID selector is an individually identified (named) selector to which a specific style is declared. Using the ID attribute the declared style can then be associated with one and only one HTML element per document as to differentiate it from all other elements. ID selectors are created by a character # followed by the selector's name. The name can contain characters a-z, A-Z, digits 0-9, period, hyphen, escaped characters, Unicode characters 161-255, as well as any Unicode character as a numeric code; however, they cannot start with a dash or a digit.
#abc123 {color: red; background: black}
<P ID=abc123>
This and only this element can be identified as abc123
</P>