Typography & Fonts
CSS Typography & Fonts Cheat Sheet
Font Properties
Font Family
/* Basic font family */
.text {
font-family: Arial, sans-serif;
font-family: "Times New Roman", serif;
font-family: "Courier New", monospace;
font-family: Georgia, serif;
font-family: Verdana, sans-serif;
}
/* Multiple fallbacks */
.text {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}
/* Generic font families */
.text {
font-family: serif; /* Times, Georgia, etc. */
font-family: sans-serif; /* Arial, Helvetica, etc. */
font-family: monospace; /* Courier, Monaco, etc. */
font-family: cursive; /* Comic Sans, Brush Script, etc. */
font-family: fantasy; /* Impact, Papyrus, etc. */
font-family: system-ui; /* System default */
}Font Size
Font Weight
Font Style
Font Variant
Font Stretch
Font Shorthand
Text Properties
Text Color
Text Alignment
Text Decoration
Text Transform
Text Indent
Letter Spacing
Word Spacing
Line Height
White Space
Word Break
Word Wrap
Overflow Wrap
Web Fonts
Google Fonts
Local Fonts with @font-face
Font Display
Advanced Typography
Text Shadow
Text Overflow
Vertical Alignment
Text Direction
Writing Mode
Text Orientation
Typography Best Practices
Responsive Typography
Font Loading Optimization
Typography Scale
Accessibility
Common Typography Patterns
Last updated