Home > Web Front-end > HTML Tutorial > HTML
tag creates a horizontal line in the page

HTML
tag creates a horizontal line in the page

WBOY
Release: 2016-08-29 08:36:49
Original
3538 people have browsed it

1. Definition and usage


tag creates a horizontal line in an HTML page.

Horizontal rule can visually separate a document into parts.

Second, the difference between HTML and XHTML

In HTML, the


tag has no closing tag.

In XHTML,


must be closed correctly, such as
.

In HTML 4.01, all rendering attributes of the hr element are deprecated.

In XHTML 1.0 Strict DTD, all rendering attributes of the hr element are not supported.

Example:

<html>

<body>
<p>hr 标签定义水平线:</p>
<hr />
<p>这是段落。</p>
<hr />
<p>这是段落。</p>
<hr />
<p>这是段落。</p>
</body>
</html>
Copy after login

The rendering is as follows:

source:php.cn
Previous article:CSS naming convention Next article:HTML