Fonts

In CSS2, the fonts module is used to define size, line height, and weight of a text, as well as other properties such as style and family.

In CSS we could use only predefined font families that were available on the computer, but CSS3 gives us the facility to use user-defined fonts which can be used to style the web forms.

The @font-face rule

Fonts play a major role in deciding how a page or a particular part of a page looks, and that's where the web designers and corporates take benefit, such as in the case of branding.

The @font-face property has taken the usage of fonts to the next level.

This rule allows users to specify any real fonts to the text on the web forms or page. To be more precise, this rule allows downloading a particular font ...

Get Mastering HTML5 Forms now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.