HTML <font> Tag
The <font> tag in HTML plays an important role in the web page to create an attractive and readable web page. The font tag is used to change the color, size, and style of a text. The base font tag is used to set all the text to the same size, color and face.
<font attribute = "value"> Content </font>
Example: In this example, we have used the <font> tag with a font size as 5.
The font tag has basically three attributes which are given below:
Note: Font tag is not supported in HTML5.
We will discuss all these attributes & understand them through the examples.
font Size: This attribute is used to adjust the size of the text in the HTML document using a font tag with the size attribute. The range of size of the font in HTML is from 1 to 7 and the default size is 3.
Example: This example uses the <font> tag where different font sizes are specified.
Font Type: Font type can be set by using face attribute with font tag in HTML document. But the fonts used by the user need to be installed in the system first.
Example: This example describes the <font> tag with different font type & font size.
Font Color: Font color is used to set the text color using a font tag with the color attribute in an HTML document. Color can be specified either with its name or with its hex code.
Example: This example describes the <font> tag with different font colors.
- Google Chrome
- Microsoft Edge 12 and above
- Internet Explorer
Please Login to comment...