What is font-size?

A font-size property in CSS indicates the size of the text. Font-size is specified by using an absolute-size or relative-size keyword, as well as the or values.


More About font-size

When changing the font-size property, it’s important not to change the paragraphs into headings and vice versa. To avoid this, you can use a heading HTML tag ( h1 ) and paragraph tags (p).

Without specifying font size, the default for paragraphs will be 16px. Maximum legibility is around 16px to 18px for body text. Headings are typically 1.96x larger than this.

You can reset font size with pixels (px), points (pt), em, ex, or percentages (%). You can also set a keyword font size in the HTML to create relative font-sizing. As another option, you can use a combination of percent and em.

Special Offer
Custom Website Design
Get a one-of-a-kind, mobile-friendly website that makes your brand truly shine. Share your vision with us and we'll take it from there.