<?xml version="1.0" encoding="utf-8"?>

CSS font-size property

CSS font-size property Bad Practice
CSS font-size property Best Practice

The font-size property sets the size of the text. There are several ways to specify the font size, including keywords and numerical values. The choice depends on your needs, but the most commonly used values are absolute length values in px and relative length values in em and rem. The property also accepts percentage values.[1]

Pro Tip: Use the font-size property for styling purposes only. To create headings, use the <h1>-<h6> tags.

Improve your UX & Product skills with interactive courses that actually work