CSS Cheat Sheet
Typography
font-family
Specifies the font family.
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-style
Defines the style of the text (italic, normal, etc.).
font-style: italic;
font-variant
Specifies whether or not the text should be displayed in small-caps.
font-variant: small-caps;
font-weight
Sets the weight (boldness) of the text.
font-weight: bold;
font-size
Specifies the font size.
font-size: larger;
Text Properties
text-align
Specifies the horizontal alignment of text.
text-align: justify;
letter-spacing
Increases or decreases the space between characters.
letter-spacing: .15em;
text-decoration
Adds decoration to text (underline, overline, etc.).
text-decoration: underline;
word-spacing
Sets the space between words.
word-spacing: 0.25em;
text-transform
Controls the capitalization of text.
text-transform: uppercase;
line-height
Sets the amount of space between lines of text.
line-height: normal;
Background
background-image
Sets an image as the background.
background-image: url('Path');
background-position
Specifies the position of the background image.
background-position: right top;
background-size
Specifies the size of the background image.
background-size: cover;
background-repeat
Sets if/how the background image will repeat.
background-repeat: no-repeat;
Border
border-width
Specifies the width of the border.
border-width: 5px;
border-style
Specifies the style of the border (solid, dashed, etc.).
border-style: solid;
border-color
Specifies the color of the border.
border-color: aqua;
border-radius
Rounds the corners of the border.
border-radius: 15px;
Box Model
Float
float: none;
Leave a Comment
Join the conversation by leaving a comment below.
You need to login before commenting.