CSS #id Selector
Complete CSS Selector Reference Manual
Example
Add the specified style to the element with id="firstname":
#firstname
{
background-color:yellow;
}
{
background-color:yellow;
}
Try it Yourself »
Definition and Usage
#idThe selector specifies the style of elements with an ID.
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support #idSelector.
other extensions