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.
When we use tag to set all the text to the same size, face, and color. The default size of a font is 3.
HTML Font Face
Choose different font face using any font you have installed. You can install different type of fonts. The default font face is Times New Roman.
HTML Code:
<p>
<font size="5">Here is a size 5 font </font>
<font color="#990000">This text is hexcolor #990000 </font>
<br />
<font color="green">This text is green </font>
<font face="Bookman Old Style, Book Antiqua, Garamond">Welcome to the
world of Aonestudy Tutorial.</font>
</p>
Output
Here is a size 5 font
This text is hexcolor #990000
This text is green
Welcome to the world of Aonestudy Tutorial.
HTML BaseFonts
With the <basefonts> tag you will be able to set the default font for your web page. If you want to use basefont size is 2 it is correct way to set your basefont.
HTML Code:
<html>
<body>
<basefont size="2">
<p>Welcome to the world of Aonestudy Tutorial. </p>
<p>Welcome to the world of Aonestudy Tutorial. </p>
<p>Welcome to the world of Aonestudy Tutorial. </p>
</basefont>
</body>
</html>
Output:
Welcome to the world of Aonestudy Tutorial.
Welcome to the world of Aonestudy Tutorial.
Welcome to the world of Aonestudy Tutorial.
Beautiful HTML First Letter Style
If you want to beautiful look font size on your page.
HTML Code:
<p> <font size="7">W </font>elcome
to the world of aonestudy tutorial. </p>
Output:
Welcome
to the world of aonestudy tutorial.
|