HTML Cheat Sheet.com / CSS

HTML Cheat / CSS

Basics

Selectors

*

div

div,p

div p

div > p

div + p

div ~ p

.classname

#idname

div.classname

div#idname

#idname *

all elements

all div tags

all divs and paragraphs

paragraphs inside divs

all p tags, one level deep in div

p tags immediately after div

p tags preceded by div

all elements with class

element with ID

divs with certain classname

div with certain ID

all elements inside #idname

Pseudo classes

selector{

property: value;

property2: value2;

}

Include external css file

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download