Home >Web Front-end >HTML Tutorial >HTML Tutorial - Fonts
In HTML, font tags are not supported. It is generally believed that this tag will be cleared out in future versions of HTML.
Even though many people are using it, we should try to avoid it and use styles instead.
Font tag font
Using HTML code similar to the following, you can define the size and type of browser output:
<p><font size="2" face="Verdana"> This is a paragraph. </font></p> <p><font size="3" face="Times"> This is another paragraph. </font></p>
Font tag font
Using HTML code similar to the following, you can define Browser output size and type:
<p> <font size="2" face="Verdana"> This is a paragraph. </font> </p> <p> <font size="3" face="Times"> This is another paragraph. </font> </p>
Font attributes
Attribute example function size="number" size="2" defines the font size. size="+number"size="+1"increases the font size. size="-number" size="-1" reduces the font size. face="face-name" face="Times" defines the font name. color="color-value" color="#eeff00" defines the font color. color="color-name" color="red" defines the font color.
Please do not use the font tag
In the latest versions of HTML (HTML 4 and XHTML), the font tag has been deprecated.
The World Wide Web Consortium has removed the font tag from its standards and in the future, style sheets (CSS) will be used to define layout and display attributes of HTML elements.
The above is the content of HTML tutorial - fonts. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!