HTML Style Font Size with CSS

Changing the font size of html is very simple with CSS. The CSS property for changing html style font size is called "font-size". Below is an example on how to change the font size, first the HTML and then the CSS.

A simple P Tag in HTML

This is a paragraph with a bigger font size.

The CSS for changing the font size

p#styleme {
     font-size:2em; 
}    

Result:

This is a paragraph with a bigger font size.

EM is a unit of measurement, but you can also use pixels to change the font size like: font-size: 16px; Simple! Right?

Share

Learn how to design amazing websites