CSS #id Selector
Example
Select and style the element with id="firstname":
#firstname
{
background-color: yellow;
}
Try it Yourself »
Definition and Usage
The #id
selector selects the element with the specified id.
Version: | CSS1 |
---|
Browser Support
Selector | |||||
---|---|---|---|---|---|
#id | Yes | Yes | Yes | Yes | Yes |
CSS Syntax