cascading style sheets cheatsheet

the font settings

default text

font family sets the font of the text and creates backup fonts in case the first font fails to load.

font variant: small caps

font style: italic

font weight: 100-900. lower numbers are thinner. default font is 400. bold is 700.

font size: can be large, a px value, a percent value, or an em value.

font is the shorthand option for all of the properties of font.


the color settings

default text

color: can be passed as a named color, reg(), #hexadecimal, hsl(), hwb(). all use comma's inside of ().

background color

background image

there are background-repeat and background-attachment css attributes that will change how background images repeat across the screen.

background is the shorthand options for all of the properties of background


text properties

default text

word spacing: used to change the distance between words

letter spacing

text decoration: options are overline, underline, line-through, and none. you can also choose the type of line.

text align: right, left, center, justify

text-indent: Lorem ipsum dolor sit amet consectetur adipisicing elit. Accusamus rem, inventore placeat eius eligendi, consectetur nisi quas aperiam quae aspernatur ipsum nemo. Fugiat, ex provident. Aliquam suscipit nulla aperiam! Dolore.

line height: Lorem ipsum dolor sit amet consectetur adipisicing elit. Sed voluptates reiciendis aperiam iste, tempora facere ipsa harum dolore unde, et delectus necessitatibus nulla. Odit, laboriosam iste! Placeat sequi minus libero!

text shadow: x, y, blur, color


box properties

css box model: Lorem ipsum dolor sit amet consectetur adipisicing elit. Recusandae consequuntur est non maiores? Officiis tempora excepturi, amet facilis laborum quos quisquam fuga nam accusamus temporibus, labore consectetur ipsa commodi praesentium!