HTML font tag | HTML font color code
NotSupportedinHTML5.ThetagwasusedinHTML4tospecifythefontface,fontsize,andcoloroftext.WhattoUseInstead?ExampleSetthecoloroftext(withCSS):
The <font> tag was used in HTML 4 to specify the font face, font size, and color of text.
What to Use Instead? ExampleSet the color of text (with CSS):
<p style="color:red">This is a paragraph.</p><p style="color:blue">This is another paragraph.</p>
Try it Yourself »[1] ExampleSet the font of text (with CSS):
<p style="font-family:verdana">This is a paragraph.</p><p style="font-family:Courier New">This is another paragraph.</p>
Try it Yourself »[2] ExampleSet the size of text (with CSS):
<p style="font-size:30px">This is a paragraph.</p><p style="font-size:11px">This is another paragraph.</p>
Try it Yourself »[3]In our CSS tutorial you can find more information about CSS Text[4] and CSS Fonts[5].
References Try it Yourself » (www.w3schools.com) Try it Yourself » (www.w3...