目录

<font>

描述 (Description)

HTML 标记用于指定文本的字体。 它在HTML和XHTML中都已弃用。

例子 (Example)

<!DOCTYPE html>
<html>
   <head>
      <title>HTML font Tag</title>
   </head>
   <body>
      <font face = "cursive,serif" color = "#ff9900" size = "4">
         The HTML font tag is now deprecated. You should use start using CSS to set
            font size and family.
      </font>
   </body>
</html>

这将产生以下结果 -

新页面打开

全局属性 (Global Attributes)

此标记支持HTML Attribute Reference描述的所有全局属性

具体属性 (Specific Attributes)

HTML 标记还支持以下附加属性 -

属性 描述
colorrgb(x,x,x) #hexcode colorname Deprecated - 指定文本的颜色。
faceList of font names Deprecated - 指定字体系列。
sizenumber Deprecated - 指定从1到7的字体大小。

事件属性 (Event Attributes)

此标记支持HTML Events Reference中描述的所有事件属性

浏览器支持 (Browser Support)

ChromeFirefox IE OperaSafariAndroid
YesYesYesYesYesYes
↑回到顶部↑
WIKI教程 @2018