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?
Student
I am Utpal Vishwas from Uttar Pradesh. Have completed my B. Tech. course from MNNIT campus Prayagraj in 2022. I have good knowledge of computer networking.
The 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