<font> tag is used to add style, size, and color to the text on your site. You can use a <basefont> tag to set all of your text to the same size, face, and color.
The font tag is having three attributes called size, color, and face to customize your fonts.
To change any of the font attributes at any time within your page, simply use the <font> tag. The text that follows will remain changed until you close with the </font> tag. You can change any or all of the font attributes at the one time, by including all the required changes within the one <font> tag.
NOTE: The font and basefont tags are deprecated and it is supposed to be removed in a future version of HTML. So it should not be used. Its is suggested to use css styles to manipulate your font.
1. Font Size:
You can set the size of your font with size attribute. The range of accepted values is from 1(smallest) to 7(largest). The default size of a font is 3.
Example:
Try it
<html> <head> <title>techTutorialsOnline title</title> </head> <body> <font size="1">Font size="1"</font> <font size="2">Font size="2"</font> <font size="3">Font size="3"</font> <font size="4">Font size="4"</font> <font size="5">Font size="5"</font> <font size="6">Font size="6"</font> <font size="7">Font size="7"</font> </body> </html>
2. Font Face:
You can set any font you like using face attribute but be aware that if the user viewing the page doesn’t have the font installed, they will not be able to see it. Instead they will default to Times New Roman of your font with size attribute. See below few examples on using different font face
Example:
Try it
<html> <head> <title>techTutorialsOnline title</title> </head> <body> <font face="Times New Roman" size="5">Times New Roman</font> <font face="Verdana" size="5">Verdana</font> <font face="Comic sans MS" size="5">Comic Sans MS</font> <font face="WildWest" size="5">WildWest</font> <font face="Bedrock" size="5">Bedrock</font> </body> </html>
3.Font Color:
You can set any font color you like using color attribute. You can specify the color that you want by either the color name or hexadecimal code for that color.
Example:
Try it
<html> <head> <title>techTutorialsOnline title</title> </head> <body> <font color="#FF00FF">This text is hexcolor #FF00FF</font> <font color="red">This text is red</font> </body> </html>