Export (0) Print
Expand All

Child

Specifies a direct descendant relationship between selector elements.

Syntax

E>F { sRules }

Possible values

E

String that specifies the name of a document language element type or simple selector.

F

String that specifies the name of a document language element type or simple selector.

sRules

String that specifies one or more cascading style sheet property/value pairs.

Remarks

A child combinator is a greater-than sign (>) that separates two simple selectors. White space is not significant. A selector of the form "E>F" matches when element F is a direct descendant of element E.

Example

The following style rule matches only P elements that are immediate children of the BODY element:

<style>
    body>p {line-height: 1.3;}
</style>

Standards information

See also

Send feedback about this topic to Microsoft. © 2011 Microsoft Corporation. All rights reserved.

Community Additions

ADD
Show:
© 2015 Microsoft