CSS element.class Selector
Example
Select and style every <p> element with the class "intro":
p.intro
{
background-color: yellow;
}
Try it Yourself »
Definition and Usage
The element.class selector is used to select the specified element with the the specified class.
| Version: | CSS1 |
|---|
Browser Support
| Selector | |||||
|---|---|---|---|---|---|
| element.class | Yes | Yes | Yes | Yes | Yes |
CSS Syntax