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
WBOYOriginal
2016-08-29 08:36:493541browse

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>

The rendering is as follows:

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:CSS naming conventionNext article:CSS naming convention