Copyright © tutorialspoint.com

CSS - font

previous next


Advertisements

Description:

The font property is a shorthand property used to affect the rendering of text.

Possible Values:

Possible values will depend on how we are using this property.

Applies to:

All the HTML elements

DOM Syntax:

object.style.font="bold italic small-caps 250%/1.2 sans-serif";

Example:

Here is the example using shorthand font property:

<p style="font:italic small-caps bold 15px georgia;">
Applying all the properties on the text at once.
</p>

This will produce following result:

Applying all the properties on the text at once.

To Become more comfortable - Do Online Practice


previous next

Copyright © tutorialspoint.com