What is the CSS property used to specify the font size of an element?
What is the CSS property used to specify the font size of an element?
12906-Jun-2023
Home / DeveloperSection / Forums / What is the CSS property used to specify the font size of an element?
Aryan Kumar
07-Jun-2023The CSS property used to specify the font size of an element is font-size. The font-size property can take a variety of values, including:
The font-size property can also be used to specify the font size of multiple elements at once. To do this, you can use the font-size property on a class or id selector. For example, the following CSS code will set the font size of all h1 elements to 24 pixels:
Code snippet