THE WORLD'S LARGEST WEB DEVELOPER SITE

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



COLOR PICKER

colorpicker

SHARE THIS PAGE






Search w3schools.com:

Translate w3schools.com: