font for html code example
Example 1: font-style css
#example {
font-style: normal;
font-style: italic;
font-style: oblique;
font-style: inherit;
font-style: initial;
}
Example 2: use font on website html
<style type="text/css">
@font-face {
font-family: "My Custom Font";
src: url(http://www.example.org/mycustomfont.ttf) format("truetype");
}
p.customfont {
font-family: "My Custom Font", Verdana, Tahoma;
}
</style>
<p class="customfont">Hello world!</p>
Example 3: font-family css
font-family: "Times New Roman", Georgia, serif;
Example 4: html how to change text color
<p style="color:red;">This paragraph is red.</p>
Example 5: font tag html
Not Supported in HTML 5 | Support till HTML 4
<font color="red" face="Verdana, Geneva, sans-serif" size="+1">
Your formatted text goes here
</font>
Example 6: font family css
font-family: "Comic Sans MS", cursive, sans-serif;