HTML Font Size

This page provides you with the HTML font-size code that you can use to copy/paste into your own website.

You change the size of the text by using the font-size property:

The above code results in this:

This text has been set to 20pt using the CSS font-size property.

More About Font Size

You aren't restricted to just using point size (pt) when setting the font size. You can use a number of different values.

For example, you could use pixels or a percentage value.

Here's an example of using a pixel value:

The above code results in this:

This text has been set to 20px using the CSS font-size property.

Here's an example of using a percentage value:

The above code results in this:

This text has been set to 130% using the CSS font-size property.

Possible Values

When setting font size, you can use the following values:

Absolute Size:

Relative Size:

Length:

Percentage: