Font family in css in web development

By: Prof. Fazal Rehman Shamil
Last modified on May 27th, 2019

What is font family?

Font family represents the different type of fonts for text.

Example:

<html>
<head>
<style>
.height_set
{
color : green;
background : yellow;
font-family:”Times New Roman”;
}
</style>
</head>
<body>
<div class=”height_set”>this is font family representation in time new roman</div></h1>
</body>
</html>

Output:

This is font family representation in time new roman

Different font families:

This is Times new roman
This is impact
This is verdana
This is Times comic sans ms

and many other font families are also available for use in CSS.