0% found this document useful (0 votes)
317 views1 page

CSS Cheat Sheet Guide

This document provides a cheat sheet for CSS with definitions and examples of common CSS properties, selectors, and values. It includes summaries of box model properties, positioning properties, typography properties, and lists. The cheat sheet acts as a quick reference guide for CSS syntax, selectors like classes and IDs, units, media types, and shorthand property notation.

Uploaded by

Sushant Dasuri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
317 views1 page

CSS Cheat Sheet Guide

This document provides a cheat sheet for CSS with definitions and examples of common CSS properties, selectors, and values. It includes summaries of box model properties, positioning properties, typography properties, and lists. The cheat sheet acts as a quick reference guide for CSS syntax, selectors like classes and IDs, units, media types, and shorthand property notation.

Uploaded by

Sushant Dasuri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

08/04/2015

CSSCheatSheet

CSSCHEATSHEET
Shorthand*
background
border
borderbottom
borderleft
borderright
bordertop
font
liststyle
margin
padding

Comments
/*Comment*/

Pseudo
Selectors
:hover
:active
:focus
:link
:visited
:firstline
:firstletter

Media
Types
all
braille
embossed
handheld
print
projection
screen
speech
tty
tv

Units
Length%
em
pt
px
Keywords
bolder
lighter
larger

SYNTAX

BOXMODEL

Syntax
selector{property:value}
ExternalStyleSheet
<linkrel="stylesheet"type="text/css"
href="style.css"/>
InternalStyle
<styletype="text/css">
selector{property:value}
</style>
InlineStyle
<tagstyle="property:value">

GENERAL
Class
ID
div
span
color
cursor
display

Stringprecededbyaperiod
Stringprecededbyahashmark
Formatsstructureorblockoftext
Inlineformatting
Foregroundcolor
Appearanceofthecursor

heightwidthmargintop
marginrightmargin
bottommarginleft
paddingtoppaddingright
paddingbottompadding
left

BORDER
border
width
border
style

Widthoftheborder

border
color

Coloroftheborder

POSITION
clear

Anyfloatingelementsaroundtheelement?

float

Floatstoaspecifiedside

blockinlinelistitemnone

overflow Howcontentoverflowingitsboxis
handled
visible,hidden,scroll,auto

visibility visible,hidden

FONT

dasheddotteddoublegrooveinsetoutset
ridgesolidnone

both,left,right,none
left,right,none

left

Theleftpositionofanelement
auto,lengthvalues(pt,in,cm,px)

top

Thetoppositionofanelement
auto,lengthvalues(pt,in,cm,px)

fontstyle Italic,normal

position static,relative,absolute

font
variant
font
weight

zindex Elementaboveorbelowoverlappingelements?

normal,smallcaps
bold,normal,lighter,bolder,integer
(100900)

fontsize Sizeofthefont
font
Specificfont(s)tobeused
family

TEXT
letter
Spacebetweenletters
spacing
lineheight Verticaldistancebetween
baselines
textalign Horizontalalignment
text
blink,linethrough,none,overline,
decoration underline
textindent Firstlineindentation
text
capitalize,lowercase,uppercase
transform
vertical
Verticalalignment
align
word
Spacingbetweenwords
spacing

auto,integer(highernumbersontop)

BACKGROUND
backgroundcolor Backgroundcolor
backgroundimage Backgroundimage
backgroundrepeat repeat,norepeat,repeatx,repeaty
background
attachment

Backgroundimagescrollwiththe
element?
scroll,fixed

background
position

(xy),top,center,bottom,left,right

LIST
liststyle Typeofbulletornumberinginthelist
type
disccirclesquaredecimallowerromanupper
romanloweralphaupperalphanone

liststyle Positionofthebulletornumberinalist
position insideoutside
liststyle Imagetobeusedasthebulletinalist
image

*Thepropertiesforeachselectorareintheordertheyshouldappearwhenusingshorthandnotation.

http://lesliefranke.com/files/reference/csscheatsheet.html

1/1

You might also like