CSS Cheat Sheet
1. Selectors
* { color: blue; } /* Universal Selector */
p { color: red; } /* Element Selector */
.class { color: green; } /* Class Selector */
#id { color: orange; } /* ID Selector */
div > p { color: purple; } /* Child Selector */
div p { color: pink; } /* Descendant Selector */
div + p { color: brown; } /* Adjacent Sibling Selector */
div ~ p { color: gray; } /* General Sibling Selector */
2. Colors & Backgrounds
color: red; /* Text color */
background-color: yellow; /* Background color */
background-image: url('image.jpg'); /* Background image */
background-size: cover;
background-repeat: no-repeat;
background-position: center;
opacity: 0.5; /* Transparency */
3. Text & Font
font-family: Arial, sans-serif;
font-size: 16px;
font-weight: bold; /* normal, bold, bolder, lighter */
font-style: italic; /* normal, italic, oblique */
text-align: center; /* left, right, center, justify */
text-decoration: underline; /* none, underline, overline, line-through */
text-transform: uppercase; /* lowercase, capitalize */
line-height: 1.5;
letter-spacing: 2px;
word-spacing: 5px;