Copyright © tutorialspoint.com

CSS - font-weight

previous next


Description:

The font-weight property alters the visual weight of characters in an element.

Possible Values:

Applies to:

All the HTML elements

DOM Syntax:

object.style.fontWeight="900";

Example:

Here is the example using this property:

<p style="font-weight:bold;">
This font is bold.
</p>
<p style="font-weight:bolder;">
This font is bolder.
</p>
<p style="font-weight:900;">
This font is 900 weight.
</p>

This will produce following result:

This font is bold.

This font is bolder.

This font is 900 weight.

To Become more comfortable - Do Online Practice


previous next

Copyright © tutorialspoint.com