The font-size property specifies the size of a font.
Examples:
p.one {
font-size: 14px;
}
p.two {
font-size: 14px;
}
p.three {
font-size: 14px;
}
xx-small
The font-size is set to xx-small.
x-small
The font-size is set to x-small.
small
The font-size is set to small.
medium
Default value. The font-size is set to medium.
large
The font-size is set to large.
x-large
The font-size is set to x-large.
xx-large
The font-size is set to xx-large.
smaller
The font-size is set to a smaller size then the font-size of its parent element.
larger
The font-size is set to a larger size then the font-size of its parent element.
length
Defines in length units (px, pt, em, etc.) the font-size.
%
Defines the font-size in percentage of its parent element’s font-size.
initial
Sets the property to its default value.
inherit
Inherits this property’s value from its parent item.
Have a code example of font-size
? Submit a codepen.io demo and we'll showcase it here ↴