HTML Dog
Skip to navigation

CSS Property: font-size

Font size. Size of a font. Font? The size of it.

Possible Values

ValueNoteExample
[length]When em or ex units are used, font size is calculated in relation to the containing box’s font size.
Should not be a negative value.
12px
[percentage]Calculated as a percentage of the containing box’s font size.
Should not be a negative value.
150%
largerLarger than the inherited font size.
smallerSmaller than the inherited font size.
xx-smallExtra EXTRA small.
x-smallExtra small.
smallSmaller than medium.
mediumThe standard reference middle value.
largeLarger than medium.
x-largeExtra large.
xx-largeExtra EXTRA large.
inherit
initial
unset

Example


p { font-size: 16px; }