当前位置: 首页 > 网络学院 > 网页制作基础教程 > HTML > HTML <hr> 标签
The <hr> tag inserts a horizontal rule.
<hr>标签可以插入水平线
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.
如何插入一条水平线