Use the CSS font-size
property to determine the size of your text.
.container {
font-size: 33px;
}
This property takes several types of values:
.container {
font-size: xx-large;
}
The question is: which type of value should you choose and why?
That’s the question this article tackles. It’ll show you how to use the font-size
property and the differences between its many values. So the next time you need to change the font size of your text, you’ll know which value to reach for.
There are two types of keyword values you can use with font size: absolute-size
and relative-size
keywords. Let’s start with absolute.
The code below uses the absolute-size keyword **small**
to size the HTML text.
.childElement {
font-size: small;
}
There are more absolute-size keyword options to choose from:
The value of an absolute-size keyword is determined by the browser’s default font size. Typically, that size is medium.
#css #html #web-development #programming #developer