HTML

HTML – Font Tag with Example

Font tag in HTML is used to represent the font structure (font type), font size, and font color of the document. It does help to change the look of the text in the document.

Font Parameters.

Parameter Description
Face It specifies the name of the font to be used on the document.
Size The size of the font or the text.
Color It will define the color of the text.

Font Face Tag has been depreciated from HTML 5. HTML 5 is combination of all the tools and codes. It does use CSS for most of the depreciated tags.

Font Tag Examples (Old Way)

<font face="Arial" size=9 color=Red>A quick brown fox jumps over the lazy dog. </font>

HTML 5 Accepts CSS for applying Font and its parameters. If the Font Face tag is depreciated then what to use? HTML 5 has a great and easy way to use depreciated tags.

Example 1

<span style="font-family:fontname">text that you want to put. </span>
<span style="font-size:fontsize">text that you want to put. </span>
<span style="font-color:colorname">text that you want to put. </span>

For example in Realtime

<span style="font-family:Arial">text that you want to put. </span>
<span style="font-size:15px">text that you want to put. </span>
<span style="font-color:#334">text that you want to put. </span>
Back to top button