Home > Common Problem > body text

What does hr in HTML mean?

百草
Release: 2023-06-19 13:26:10
Original
6640 people have browsed it

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>
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template