CSS Selector Tester

Enter HTML code and CSS selectors to see matching elements in real time

Example selector:
Matching results 0 matches

CSS Selector Reference

element Element selector
.class Class selector
#id ID selector
* Wildcard selector
A B Descendant selector
A > B Subselector
A + B Neighbor Brothers
A ~ B Universal Brothers
[attr] attribute exists
[attr=val] Attribute equal to
[attr^=val] Beginning of attributes
[attr$=val] End of attribute
[attr*=val] Attribute contains
:first-child First child element
:last-child Last child element
:nth-child(n) nth child element
:not(sel) Negative selector
:hover mouseover