CSS Typography
CSS Typography — Style text on the web with fonts, sizes, weights, spacing, alignment, and web font integration. The guide walks through Font Families, Font Size, Weight, and Style, Text Alignment and Decoration, Line Height and Spacing, Web Fonts with @font-face. The font-family property specifies the typeface for text. Always provide fallback fonts: body { font-family: "Inter", system-ui, -apple-system, sans-serif; } h1 { font-family: "Georgia", "Times New Roman", serif; } code { font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace; } Font categories: - Serif: Georgia, Times New Roman, Merriweather (print-like) - Sans-serif: Inter, Helvetica, Arial, system-ui (clean, modern) - Monospace: JetBrains… Font Size: p { font-size: 16px; } /* Fixed pixel size */ p { font-size: 1rem; } /* Relative to root (recommended) */ p { font-size: 1.2em; } /* Relative to parent font */ p { font-size: clamp(1rem, 2.5vw, 1.5rem); } /* Fluid typography */ Font Weight: .text-thin { font-weight: 100; } .text-light { font-weight: 300; } .text-normal { font-weight:…