CSS element,element Selector
Example
Select and style all <h1> elements AND all <p> elements:
h1, p
{
background-color: yellow;
}
Try it yourself »
Definition and Usage
To style several elements with the same style, separate each element name with a comma.
Version: | CSS1 |
---|
Browser Support
Selector | |||||
---|---|---|---|---|---|
element,element | Yes | Yes | Yes | Yes | Yes |
CSS Syntax