The HTML <font> Tag Should NOT be Used
The <font> tag is deprecated in HTML 4, and removed from HTML5.
The World Wide Web Consortium (W3C) has removed the <font> tag from its recommendations.
In HTML 4, style sheets (CSS) should be used to define the layout and display properties for many HTML elements.
The example below shows how the HTML could look by using the <font> tag:
Example
<p>
<font size="5" face="arial" color="red">
This paragraph is in Arial, size 5, and in red text color.
</font>
</p>
<p>
<font size="3" face="verdana" color="blue">
This paragraph is in Verdana, size 3, and in blue text color.
</font>
</p>
Try it yourself »
Example
<p>
<font size="5" face="arial" color="red">
This paragraph is in Arial, size 5, and in red text color.
</font>
</p>
<p>
<font size="3" face="verdana" color="blue">
This paragraph is in Verdana, size 3, and in blue text color.
</font>
</p>
Try it yourself »
The Right Way to Do It - With Styles
Set the font of text
This example demonstrates how to set the font of a text.
This example demonstrates how to set the font of a text.
Set the font size of text
This example demonstrates how to set the font size of a text.
This example demonstrates how to set the font size of a text.
Set the font color of text
This example demonstrates how to set the color of a text.
This example demonstrates how to set the color of a text.
Set the font, font size, and font color of text
This example demonstrates how to set the font, font size, and font color of a text.
This example demonstrates how to set the font, font size, and font color of a text.
0 Comments