Hosting Solutions
mobile_logo Table of Contents
seal_frontseal_back

Selectors

Reference the CSS selectors to discover all of the ways to target HTML elements for style selection. Standard Selectors * - universal e - type e, e, e - compound .class - class #id - id Combinator Selectors e e - descendant e > e - child e + e - adjacent sibling e ~ e - general sibling Structural pseudo-class Selectors e:nth-child(n) e:nth-last-child(n) e:nth-of-type(n) e:nth-last-of-type(n) e:first-child e:last-child e:first-of-type e:last-of-type e:only-child e:only-of-type e:empty e:root pseudo-element Selectors e::first-line e::first-letter e::before e::after UI Element States pseudo-class Selectors e:enabled e:disabled e:checked e:default e:valid e:invalid e:in-range e:out-of-range e:required e:optional e:read-only e:read-write User Action pseudo-class Selectors e:active e:hover e:focus Link and Anchor pseudo-class Selectors e:target e:link e:visited Negation and Language pseudo-class Selectors e:lang(en) e:not(e) Attribute Selectors e[att] e[att="val"] e[att~="val"] e[att^="val"] e[att$="val"] e[att*="val"] e[att|="val"]

CSS

Fundamentals

IntroductionStyle ApproachesSelectorsAt RulesShorthand PropertiesAnimatable PropertiesWeb Standards