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


Copyright 1999-2023 by Refsnes Data. All Rights Reserved.