CSS element Selector


Example

Select and style all <p> elements:

p {
    background-color: yellow;
}

Try it yourself »

Definition and Usage

The element selector selects all elements with the specified element name.

Version: CSS1

Browser Support

Selector
element Yes Yes Yes Yes Yes

CSS Syntax

element {
    css declarations;
} Demo




SHARE THIS PAGE

COLOR PICKER

colorpicker