当前位置: 首页 > 网络学院 > 网页制作基础教程 > HTML > HTML <font>标签

HTML
HTML Head
HTML Meta
HTML URLs
HTML Scripts
HTML 属性
HTML 事件
HTML URL-encode
HTML Web服务器
HTML 摘要
HTML 实例
标签列表
标准属性
事件属性
ASCII码
特殊字符
HTTP状态消息

HTML <font>标签


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 433 ::
收藏到网摘: n/a

定义与使用

The <font> tag specifies the font face, font size, and font color of text.
<font>标签可以指定文字的字体,大小以及颜色。


它在HTML和XHTML中的区别

The font element was deprecated in HTML 4.01.
font元素在HTML4.01中不推荐使用

The font element is not supported in XHTML 1.0 Strict DTD.
在XHTML1.0严密型DTD中不再支持font元素


提示与注意点

Tip: Use styles (instead of the <font> tag) to define the font face, font size, and font color of text.
提示:请使用样式来代替<font>标签。


实例

代码 输出结果
<font size="3" color="red">
This is some text!
</font>
<font size="1" color="blue">
This is some text!
</font>
<font face="arial" color="red">
This is some text!
</font>
This is some text! This is some text! This is some text!


可选属性

DTD indicates in which DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset.
下表中的DTD列指明了被支持的DTD属性。S=Strict(精确的),T=Transitional(传统的),F=Frameset(框架)

属性 描述 DTD
color rgb(x,x,x)
#xxxxxx
colorname
Defines the color of the text in the font element. Deprecated. Use styles instead
定义font元素中文字的颜色。不推荐。使用样式来做替代
TF
face list_of_fontnames Defines the font of the text in the font element. Deprecated. Use styles instead
定义font元素中文字的字体。不推荐。使用样式来做替代
TF
size A number from 1 to 7.
If basefont is specified you can specify a number from -6 to 6
Defines the size of the text in the font element. Deprecated. Use styles instead
定义font元素中的文字大小。不推荐。使用样式来做替代
TF

标准属性

id, class, title, style, dir, lang, xml:lang

For a full description, go to Standard Attributes.
查看完整的描述

事件属性

NONE


尝试与演示

Using the font element
How to use the font element.
怎样使用font元素

评论 (0) All

登陆 | 还没注册?