HTML - Font and BaseFont



  • The <font> tag is used to add style, size, and color to the text on your site. Use the size, color, and face attributes to customize your fonts.
  • Use a <basefont> tag to set all of your text to the same size, face, and color.

1. Font Size :

  • Set the size of your font with size. The range of accepted values is form 1 to 7. The default size of a font is 3.
  • <p><font size="5">Here is a size 5 font</font></p>

2.  Font Color :

  • Set the color of your font with color.
                  <font color ="#990000">This text is hexcolor#990000</font><br/>
                  <font color="red">This text is red</font>

3. Font Face :

  • Choose a different font face using any font you have installed.
              <p><font face="Bookman old style, Book Antiqua, Garamond">This paragraph has had its font...</font></p> 

4. Base Font :

  • With the basefont tag you will be able to set the default font for your web page.
HTML Code:

       <html>
       <body>
       <basefont size="2" color="green"><p>This paragraph has had its font...</p>
       </basefont>
       </body>
       </html>