On this page
  1. font-size
  2. Syntax & Overview
  3. Notes & Best Practices
  4. Example

font-size

Prev: `font-family` | Up: typography | Next: `line-height`
Rel: typography, Typography & Color Guide
Ref: MDN Web Docs — font-size
Tags: #public #web #css #properties #typography #tier/core


Syntax & Overview

font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);

Sets text size; use rem so user browser font preferences are respected.

Notes & Best Practices

Example

body { font-size: 1rem; }
small { font-size: 0.875rem; }

Linked from

Related notes