Home >Web Front-end >HTML Tutorial >HTML Tutorial - Fonts

HTML Tutorial - Fonts

黄舟
黄舟Original
2016-12-26 15:29:221537browse

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)!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:HTML Tutorial-FrameworkNext article:HTML Tutorial-Framework