

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A comprehensive cheatsheet for cascading style sheets (css) properties including font, color, background, text, and box properties. It covers various aspects such as font-family, font-size, color, background-color, background-image, text-align, text-decoration, margin, padding, border, and width.
Typology: Lecture notes
1 / 2
This page cannot be seen from the preview
Don't miss anything!


P { font-family: "New Century Schoolbook", Times, serif; }
H1 { font-style: oblique; } P { font-style: normal; }
SPAN { font-variant: small-caps; }
H1 { font-weight: 800; } or P { font-weight: normal; }
H1 { font-size: large; } or P { font-size: 12pt; } LI { font-size: 90%; } STRONG { font-size: larger; }
P { font: italic bold 12pt/14pt Times, serif; }
H1 { color: blue; } or H2 { color: #000080; }
BODY { background-color: white; } H1 { background-color: #000080; }
BODY { background-image: url(/images/foo.gif); } P { background-image: url(http://www.htmlhelp.com/bg.png); }
BODY { background: white url(candybar.gif); background-repeat: repeat-x; }
BODY { background: white url(candybar.gif); background-attachment: fixed; }
BODY { background: white url(http://www.htmlhelp.com/foo.gif); } BLOCKQUOTE { background: #7fffd4; } P { background: url(../backgrounds/pawn.png) #f0f8ff fixed; } TABLE { background: red url(leaves.jpg) no-repeat bottom right; }
P EM { word-spacing: 0.4em; } P.note { word-spacing: -0.2em; }
H1 { letter-spacing: 0.1em; } P.note { letter-spacing: -0.1em; }
A:link, A:visited, A:active { text-decoration: none; }
IMG.middle { vertical-align: middle; } IMG { vertical-align: 50%; } .exponent { vertical-align: super; }
H1 { text-transform: uppercase; } H2 { text-transform: capitalize; }
H1 { text-align: center; } P.newspaper { text-align: justify; }
P { text-indent: 5em; }
P { line-height: 200%; }
LI.square { list-style-type: square; } UL.plain { list-style-type: none; } OL { list-style-type: upper-alpha; } /* A B C D E etc. / OL OL { list-style-type: decimal; } / 1 2 3 4 5 etc. / OL OL OL { list-style-type: lower-roman; } / i ii iii iv v etc. */
UL.check { list-style-image: url(/LI-markers/checkmark.gif); } UL LI.x { list-style-image: url(x.png); }
UL { list-style-position: inside; }
BODY { margin-top: 5pt; }
P.narrow { margin-right: 50%; }
DT { margin-bottom: 3em; }
ADDRESS { margin-left: 50%; }
BODY { margin: 5em; } /* all margins 5em / P { margin: 2em 4em; } / top & bottom 2em, left & right 4em / DIV { margin: 1em 2em 3em 4em; } / top margin 1em, right 2em, bottom 3em, left 4em */
P { padding-top: 20%; }
P { padding-right: 20 px; }
P { padding-bottom: 5 em; }
P { padding-left: 15 pt; }
BLOCKQUOTE { padding: 2em 4em 5em 4em; }
P { border-top: 20%; }
P { border-right: 20%; }
P { border-bottom: 20%; }
P { border-left: 20%; }
P { border-width: 20%; } P { border-width: 10px 5px 10px 5px; }
P { border-color: #00000; }
P { border-style: dotted; }
P { border-top: 10px, red, double; }
P { border-right: 10px, red, double; }
P { border-bottom: 10px, red, double; }
P { border-left: 10px, red, double; }
P { border: 10px, red, double; }
P { width: 15px; } H1 { width: 35%; } .foo { width: auto; }
P { height: 15px; } H1 { height: 35%; } .foo { height: auto; }
P { float: left; } H1 { float: right; } .foo { float: none; }
P { clear: left; } H1 { clear: right; } .foo { clear: none; }