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

HTML
HTML 介绍
HTML 元素
HTML 基本标签
HTML 格式
HTML 实体字符
HTML 链接
HTML 框架
HTML 表格
HTML 列表
HTML 表单
HTML 图片
HTML 背景
HTML 颜色
HTML 颜色值
HTML 颜色名
HTML 便条
HTML 布局
HTML 字体
HTML 4.0
HTML 样式

HTML <hr> 标签


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

定义与用法

The <hr> tag inserts a horizontal rule.
<hr>标签可以插入水平线


在HTML和XHTML中的区别

In HTML the <hr> tag has no end tag.
在HTML中<hr>标签不需要结束标签

In XHTML the <hr> tag must be properly closed.
在XHTML中<hr>标签必须合理的关闭

All "presentation attributes" of the hr element were deprecated in HTML 4.01.
在HTML4.01中所有与hr有关的属性都不再被推荐使用

All "presentation attributes" of the hr element are not supported in XHTML 1.0 Strict DTD.
在XHTML1.0严密型DTD中不支持所有有关hr元素的属性


实例

代码 输出结果
This is some text <hr /> 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
align center
left
right
Specifies the alignment of the horizontal rule. Deprecated. Use styles instead
指定水平线的对齐方向。[不推荐]使用样式做替代
TF
noshade noshade When set to true the rule should render in a solid color, when set to false the rule should render in a two-color "groove". Deprecated. Use styles instead
当设置为true水平线将只显示一条色线,而没有当初用两条线衬托出的凹槽效果了。[不推荐]使用样式做替代
TF
size pixels
%
Specifies the thickness (height) of the horizontal rule. Deprecated. Use styles instead
指定水平线的厚度(高度)。不推荐。可用样式来做替代
TF
width pixels
%
Specifies the width of the horizontal rule Deprecated. Use styles instead
指定水平线的宽度[不推荐]可使用样式来做替代
TF

标准属性

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

For a full description, go to Standard Attributes.
查看完整的属性

事件属性

onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

For a full description, go to Event Attributes.
查看完整的属性


尝试与演示

Horizontal rule
How to insert a horizontal rule.
如何插入一条水平线

评论 (0) All

登陆 | 还没注册?