CSS2 Cheat Sheet
by Dave Child (DaveChild) via cheatography.com/1/cs/14/
CSS2 Selectors CSS2 Sizes CSS2 Positioning
* All elements 0 0 requires no unit display clear
div <div> Relative Sizes position z-index
div * All elements within <div> em 1em equal to font size of parent (same top direction
div span <span> within <div> as 100%) right unicode-bidi
ex Height of lower case "x"
div, span <div> and <span> bottom overflow
div > span <span> with parent <div> % Percentage left clip
div + span <span> preceded by <div> Absolute Sizes float visibility
.class Elements of class "class" px Pixels
cm Centimeters CSS2 Dimensions
div.class <div> of class "class"
#itemid Element with id "itemid" mm Millimeters width min-height
in Inches min-width max-height
div#itemid <div> with id "itemid"
a[attr] <a> with attribute "attr" pt 1pt = 1/72in max-width vertical-align
pc 1pc = 12pt height
a[attr='x'] <a> when "attr" is "x"
a[class~='x <a> when class is a list
CSS2 Colours CSS2 Colour and Background
'] containing 'x'
a[lang|='en' <a> when lang begins "en" #789abc RGB Hex Notation color background-repeat
] #acf Equates to "#aaccff" background background-image
rgb(0,25, Value of each of red, green, and background-color background-position
CSS2 Pseudo Selectors and Pseudo Classes 50) blue. 0 to 255, may be swapped for
background-attachment
percentages.
:first-child First child element
:first-line First line of element
CSS2 Box Model
:first-letter First letter of element
:hover Element with mouse over
:active Active element
:focus Element with focus
:link Unvisited links
:visited Visited links
:lang(var) Element with language "var"
:before Before element
:after After element
By Dave Child (DaveChild) Published 19th October, 2011. Sponsored by Readability-Score.com
cheatography.com/davechild/ Last updated 14th May, 2014. Measure your website readability!
www.addedbytes.com Page 1 of 2. https://readability-score.com
CSS2 Cheat Sheet
by Dave Child (DaveChild) via cheatography.com/1/cs/14/
CSS2 Text CSS2 Paging
text-indent word-spacing size page-break-inside
text-align text-transform marks page
text-decoration white-space page-break-before orphans
text-shadow line-height page-break-after widows
letter-spacing
CSS2 Interface
CSS2 Fonts cursor outline-style
font font-weight outline outline-color
font-family font-stretch outline-width
font-style font-size
CSS2 Aural
font-variant font-size-adjust
volume elevation
CSS2 Boxes speak speech-rate
margin border-color pause voice-family
margin-top border-top-color pause-before pitch
margin-right border-right-color pause-after pitch-range
margin-bottom border-bottom-color cue stress
margin-left border-left-color cue-before richness
padding border-style cue-after speak-punctuation
padding-top border-top-style play-during speak-numeral
padding-right border-right-style azimuth
padding-bottom border-bottom-style
CSS2 Miscellaneous
padding-left border-left-style
border border-width content list-style-type
border-top border-top-width quotes list-style-image
border-bottom border-right-width counter-reset list-style-position
border-right border-bottom-width counter-increment marker-offset
border-left border-left-width list-style
CSS2 Tables
caption-side border-spacing
table-layout empty-cells
border-collapse speak-header
By Dave Child (DaveChild) Published 19th October, 2011. Sponsored by Readability-Score.com
cheatography.com/davechild/ Last updated 14th May, 2014. Measure your website readability!
www.addedbytes.com Page 2 of 2. https://readability-score.com