:empty

Applies one or more styles to any element that is the first child of its parent.

Syntax

:empty { sRules }

Possible values

sRules

Value that specifies one or more cascading style sheets attribute/value pairs.

Remarks

The :empty pseudo-class is a structural pseudo-class. Structural pseudo-classes enable selection based on extra information in the document tree that can't be selected using simple selectors or combinators.

Applies to

a, abbr, acronym, address, b, big, blockquote, body, caption, center, cite, code, col, colgroup, dd, dfn, dir, div, dl, dt, em, form, hn, html, i, img, input, input type=button, input type=checkbox, input type=file, input type=hidden, input type=image, input type=password, input type=radio, input type=reset, input type=submit, input type=text, kbd, label, legend, li, listing, marquee, menu, ol, p, plaintext, pre, s, samp, select, small, span, strike, strong, sub, sup, table, tbody, td, textarea, tfoot, th, thead, tr, tt, u, ul, var, xmp

See also

Concepts

:first-child
:first-of-type
:last-child
:last-of-type
:nth-child
:nth-last-child
:nth-last-of-type
:nth-of-type
:only-child
:only-of-type
:root

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