CSS fonts


Font family in CSS

Font family can also be changed or modified using CSS.You can see it from undergiven data.
    Syntax for setting font-family:
  • selector{
    font-family:value;
    }

Font style in CSS

    Font-style values in CSS
  • Normal
  • Italic
  • Oblique
    Syntax for setting font-style:
  • selector{
    font-style:value;
    }

Font size in CSS

    Syntax for setting font-style:
  • selector{
    font-size:value;
    }

Font weight in CSS

    Syntax for setting font-style:
  • selector{
    font-weight:value;
    }

Example:

<!DOCTYPE html>
<html>
<head>
<style>
p.family{
font-family:Times New Roman;
}
p.style{
font-style:italic;
}
p.size{
font-size:40px;
}
p.weight{
font-weight:40px;
}
</style>
<title>
CSS FONTS
</title>
</head>
<body>
<p class="family">This is example of font family.</p>
<p class="style">This is example of font style.</p>
<p class="size">This is example of font size.</p>
<p class="weight">This is example of font weight.</p>
</body>
</html>

Output:

This is example of font family.

This is example of font style.

This is example of font size.

This is example of font weight.