CSS font-size property
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.