CSS/Selectors
< CSS
NOTE: THE MATERIAL ON THIS WIKI PAGE IS BEING MIGRATED ONTO THE WEB EDUCATION COMMUNITY GROUP'S DEDICATED WIKI PAGE, AT http://www.w3.org/community/webed/wiki/CSS/Selectors. ITEMS MARKED WITH (MOVED) HAVE ALREADY BEEN MOVED.
Type Selector
- (MOVED) elementname
Universal Selector
- (MOVED) *
Attribute Selector
- (MOVED) [attributename]
- (MOVED) [attributename="val"]
- (MOVED) [attributename~="val"]
- (MOVED) [attributename|="val"]
- (MOVED) [attributename^="val"]
- (MOVED) [attributename$="val"]
- (MOVED) [attributename*="val"]
Class Selector
- (MOVED) .classname
ID Selector
- (MOVED) #idname
Pseudo-classes
Dynamic pseudo-classes
The target pseudo-class
- (MOVED) :target
The language pseudo-class
- (MOVED) :lang
The UI element states pseudo-classes
Structural pseudo-classes
- (MOVED) :root
- (MOVED) :nth-child
- (MOVED) :nth-last-child
- (MOVED) :nth-of-type
- (MOVED) :nth-last-of-type
- (MOVED) :first-child
- (MOVED) :last-child
- (MOVED) :first-of-type
- (MOVED) :last-of-type
- (MOVED) :only-child
- (MOVED) :only-of-type
- (MOVED) :empty
The negation pseudo-class
- (MOVED) :not
Pseudo-elements
- (MOVED) ::first-line
- (MOVED) ::first-letter
- (MOVED) ::before
- (MOVED) ::after
Combinators
Descendant combinator
- (MOVED) A B
Child combinator
- (MOVED) A > B
Adjacent sibling combinator
- (MOVED) A + B
General sibling combinator
- (MOVED) A ~ B