HTML <font> tag

HTML <font> tag : Definition

• The <font> tag was used in HTML4 and no longer supports in HTML5.

• The <font> tag defines the font color, size, font-weight and face of text in the HTML document.

<font> tag example :

<!DOCTYPE html>
<html>

   <head>
      <title>Font Size</title>
   </head>





   <body>
   <font size = "1">Font size = "1"</font><br />
      <font size = "2">Font size = "2"</font><br />
      <font size = "3">Font size = "3"</font><br />
      <font size = "4">Font size = "4"</font><br />
      <font size = "5">Font size = "5"</font><br />
      <font size = "6">Font size = "6"</font><br />
    <font size = "7">Font size = "7"</font>
   </body>





</html>


OUTPUT :


The font element example

Font size = "1"
Font size = "2"
Font size = "3"
Font size = "4"
Font size = "5"
Font size = "6"
Font size = "7"

Example 2: font family

<!DOCTYPE html>
<html>

   <head>
      <title>Font Face</title>
   </head>





   <body>
      <font face ="Times New Roman" size = "5">Times New Roman</font><br />
      <font face ="Verdana" size = "5">Verdana</font><br />
      <font face ="Comic sans MS" size =" 5">Comic Sans MS</font><br />
      <font face ="WildWest" size = "5">WildWest</font><br />
      <font face ="Bedrock" size = "5">Bedrock</font><br />
   </body>





</html>

Output :

Times New Roman
Verdana
Comic Sans MS
WildWest
Bedrock