0% found this document useful (0 votes)
55 views

CSS Cheat Sheet: by Via

This CSS cheat sheet provides a concise overview of common CSS properties for formatting text, backgrounds, borders, spacing, and sizing. Key properties are defined for setting colors, images, sizes, alignments, and styles for various page elements. The cheat sheet is arranged into clear sections covering topics like background, text, borders, and spacing/sizing with brief explanations and examples of CSS rules and property values.

Uploaded by

toosss
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)
55 views

CSS Cheat Sheet: by Via

This CSS cheat sheet provides a concise overview of common CSS properties for formatting text, backgrounds, borders, spacing, and sizing. Key properties are defined for setting colors, images, sizes, alignments, and styles for various page elements. The cheat sheet is arranged into clear sections covering topics like background, text, borders, and spacing/sizing with brief explanations and examples of CSS rules and property values.

Uploaded by

toosss
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

CSS Cheat Sheet

by bobsaget7 via cheatography.com/35112/cs/11026/

Format Background

Your CSS code is written in rule sets like below: backgr​oun​d-color Set the background to any color name or hex code
h1 {color​:bl​ue;} backgr​oun​d- Make the background an image, put your link in the
In this example color is the prop​erty and blue is the value i​mage: url("li​nk") quotes
Each line of css must end in a ; backgr​oun​d-size Change the size of your background image (set to
"​cov​er" to fill the screen)
Classes and Ids
Borders
When refere​ncing a class use a period, when refere​ncing anid use a
pound sign. Example: border​- Can be dotted​,da​she​d,s​oli​d,d​oub​le,​gro​ove​,ri​dge​,inset, or
.clas​s-name {} style outset
#id-n​ame{}
border​- Change the color of your border
color
Spacing and Sizing border​- How thick the line of the border is, set with px

padding The space inside the element width

margin The space outside the element

width Can be set by pixels (px) or percen​tages (%)

height Can be set by pixels (px) or percen​tages (%)

Text

color Change your text color (use a color name or hex code)

font-size Set the size of the text (make sure your number is followed
by 'px')

text-align Moves the placement of your text, can be center, left or


right

text- Can be underline, overline, line-t​hro​ughor none


d​eco​ration

By bobsaget7 Published 28th February, 2017. Sponsored by Readability-Score.com


cheatography.com/bobsaget7/ Last updated 28th February, 2017. Measure your website readability!
Page 1 of 1. https://readability-score.com

You might also like