Professional Documents
Culture Documents
Cheat Sheet
INcludes
Syntax
box model
selectors
Written by
Gagan Saini
Syntax
Comments
/* This is comment is CSS. */
Inline CSS
<tag style=”property: value;” />
Embedded CSS
<head>
<style>
</style>
</head>
Written by
Gagan Saini
Syntax
External CSS
<head>
<link rel=”stylesheet”
href=”style.css”/>
</head>
Written by
Gagan Saini
box model
Written by
Gagan Saini
box model
Content
It’s the actual area where the text
or other media is displayed.
Padding
It is the space b/w the content of
an element and its border.
Border
It’s around the padding & content.
Margin
It is the space outside the border
of an element.
Written by
Gagan Saini
Selectors
* Select all elements
tag Select all tag elements
tag tag2 tag2 within tag (all)
tag, tag2 All tag & tag2 elements
tag > tag2 tag2 as child of tag
tag + tag2 tag2 preceded by tag
.class All with class ‘class’
tag.class All within ‘.class’ tag
#id Element with id ‘id’
tag#id tag with id ‘id’
Written by
Gagan Saini
voilA!
Follow for more content like this.