CSS · Typography

font-size

The text size. Prefer rem for accessibility, because it respects the user’s root size.

Syntax
font-size: clamp(1rem, 2.5vw, 1.5rem)

Example

Try it

More in this group

font-family font-style font-variant-numeric font-weight letter-spacing line-height list-style overflow-wrap

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course