Syntax
font-size: value;
Example
font-size: 1rem;
Common use cases
- Setting base text size
- Responsive typography with clamp()
- Scaling headings relative to body text
Practical developer insight
Prefer rem over px for font-size — it respects the user's browser font size preference and scales better for accessibility.