Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

CSS element>element selector

CSS element>element Selector

Complete CSS SelectorComplete CSS Selector Reference Manual

Example

Selects all elements whose parent is

elements'

element:

div>p

{

background-color:yellow;

}

Try it »


Definition and Usage

element>element The selector is used to select a specified parent element.

Note: A child element cannot be styled directly if it is not selected.


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support element>elementselector.

**Note:**element>elementTo work in IE8, a DOCTYPE must be declared


Complete CSS SelectorComplete CSS Selector Reference Manual