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


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