CSS element Selector

Complete CSS Reference Complete CSS Reference

Example

How to style all <p> elements:

p
{
background-color:yellow;
}

Try it yourself »

Definition and Usage

The element selector styles all elements with the specified tagname.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The element selector is supported in all major browsers.


CSS Version

The element selector was first introduced in:

CSS 1


Complete CSS Reference Complete CSS Reference