CSS element element Selector


Example

Select and style every <p> element that is inside <div> elements:

div p {
    background-color: yellow;
}

Try it yourself »

Definition and Usage

The element element selector is used to select elements inside elements.

Version: CSS1

Browser Support

Selector
element element Yes Yes Yes Yes Yes

CSS Syntax

element element {
    css declarations;
} Demo



SHARE THIS PAGE

COLOR PICKER

colorpicker





Search w3schools.com:

Translate w3schools.com: