在 html 中,字体标签是不被支持的。一般都认为,在今后版本的 html 中,这个标签会被清除出去。
即使很多人都在用它,我们都应该尽量避免它,而使用样式取而代之。
字体标签font
使用类似下面的html代码,你可以定义浏览器输出的尺寸和类型:
<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
使用类似下面的html代码,你可以定义浏览器输出的尺寸和类型:
<p>
<font size="2" face="verdana">
this is a paragraph.
</font>
</p>
<p>
<font size="3" face="times">
this is another paragraph.
</font>
</p>
字体属性
属性例子作用size=numbersize=2定义字体大小。size=+numbersize=+1增加字体的大小。size=-numbersize=-1减少字体的大小。face=face-nameface=times定义字体名称。color=color-valuecolor=#eeff00定义字体颜色。color=color-namecolor=red定义字体颜色。
请不要使用字体标签
在最新的 html 版本(html 4 和 xhtml)中,字体标签已被废弃。
万维网联盟已从其标准中删除了字体标签,在未来,样式表(css)将用来定义布局,以及显示 html 元素的属性。
以上就是html教程-字体的内容。
