Show Menu
Cheatography

CSS SELECTORS Cheat Sheet (DRAFT) by

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Attributes

Info
Details
[att^=val]
begins with
[att$=val]
ends with
[att*=val]
contains

Selectors

Info
Details
Example
#
ID selector
input#­use­rname finds <input id='us­ern­ame­'>
.
Class selector
div.fo­o.bar finds <div class='foo bar'>
E
Element selector
p finds <p>

Combin­ators

Info
Details
Descendent
E1 E2
Child
E1 > E2
Sibling
E1 + E2
General Sibling
E1 ~ E2