Copyright © tutorialspoint.com

CSS - font-size

previous next


Advertisements

Description:

The font-size property affects the size of an element's text.

Possible Values:

Applies to:

All the HTML elements

DOM Syntax:

object.style.fontSize="12pt";

Example:

Here is the example using this property:

<p style="font-size:20px;">
This font size is 20 pixels
</p>
<p style="font-size:small;">
This font size is small
</p>
<p style="font-size:large;">
This font size is large
</p>

This will produce following result:

This font size is 20 pixels

This font size is small

This font size is large

To Become more comfortable - Do Online Practice


previous next

Copyright © tutorialspoint.com