" does not have an end tag. Its usage syntax is such as "

This is a paragraph

< hr />

This is a paragraph" visually separates the document into sections."/> " does not have an end tag. Its usage syntax is such as "


This is a paragraph

< hr />

This is a paragraph" visually separates the document into sections.">

Home  >  Article  >  What does hr in HTML mean?

What does hr in HTML mean?

百草
百草Original
2023-06-19 09:57:116635browse

In HTML, hr is a tag used to create a horizontal line in the page. "


" does not have an end tag, and its usage syntax is such as "

This is a paragraph


This is a paragraph" visually separates the document into sections.

What does hr in HTML mean?

# Operating system for this tutorial: Windows 10 system, HTML5 version, Dell G3 computer.

Definition and usage

In HTML, hr is a tag used to create a horizontal line in the page. In HTML, the


tag has no closing tag. , its usage syntax is such as "

This is a paragraph


This is a paragraph ”. The


tag creates a horizontal line in an HTML page.

Horizontal rule (horizontal rule) can visually separate the document into various parts.

Optional attributes

What does hr in HTML mean?

##


Differences between HTML and XHTML tags 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>

Running effect:

What does hr in HTML mean?

The above is the detailed content of What does hr in HTML mean?. For more information, please follow other related articles on the PHP Chinese website!

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