这篇翻译不完整。请帮忙从英语翻译这篇文章

HTML <hr> 元素表示段落级元素之间的主题转换(例如,一个故事中的场景的改变,或一个章节的主题的改变)。在HTML的早期版本中,它是一个水平线。现在它仍能在可视化浏览器中表现为水平线,但目前被定义为语义上的,而不是表现层面上。

要更改 <hr> 与段落之间的间隙或样式,请使用 CSS

特性

该元素包含全局属性

align 
设置对齐方式. 如果没有值, 默认值为 left。
color
使用颜色名或十六进制设置颜色。
noshade 
去除阴影。
size 
使用像素设置高度。
width 
使用像素或者百分比设置宽度。

示例

<p>This is the first paragraph of text. This is the first paragraph of text.
  This is the first paragraph of text. This is the first paragraph of text.</p>

<hr>

<p>This is second paragraph of text. This is second paragraph of text.
  This is second paragraph of text. This is second paragraph of text.</p>

示例运行结果:

This is the first paragraph of text. This is the first paragraph of text. This is the first paragraph of text. This is the first paragraph of text.


This is second paragraph of text. This is second paragraph of text. This is second paragraph of text. This is second paragraph of text.

规范

Specification Status Comment
HTML Living Standard
<hr>
Living Standard Definition of the hr element
HTML Living Standard Living Standard Suggested default rendering of the hr element
HTML5
<hr>
Recommendation  
HTML 4.01 Specification
<hr>
Recommendation  

浏览器兼容性

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 1.0 (Yes) (Yes) (Yes) (Yes)
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support (Yes) (Yes) (Yes) (Yes) (Yes)

相关内容

文档标签和贡献者

此页面的贡献者: lucoo01, azheng, nicholas-yangding, Ende93, pantao
最后编辑者: lucoo01,