Home  >  Article  >  Web Front-end  >  How to insert a line in HTML? A new explanation of html horizontal line tag hr

How to insert a line in HTML? A new explanation of html horizontal line tag hr

云罗郡主
云罗郡主Original
2018-12-24 14:15:1825004browse

For those who are just getting started and don’t know how to insert a line in HTML? So next we get to know the html horizontal line tag hr.

1: html horizontal line tag hr attribute


The tag mainly creates a horizontal line in html. hr is a single tag and has no end tag. And all browsers support the
tag. In HTML, the horizontal feature is 100% width, using one line independently, and placing a certain distance between the upper and lower content.

Two: How to insert a line in HTML

1. You need to right-click the html and select a text editor (for example, Notepad) from the "Open with" menu ).

2. Select the html position where you want to insert the line, then click on the far left side of the code and place the cursor directly at the beginning of the line.

3. Create a space, hold Enter twice and move down, then move the cursor up to the blank space.

4. Add the "hr" tag,


enter a space before the start of the line, and the
tag will create a horizontal line throughout the page.

5. Move the line in front of the "hr" label to a new line and press Enter. At this time, the


label should display a horizontal line.

For example:

<DOCTYPE html> 
<html> 
<body >
 <h1>这是一个标题</h1 >
 <hr>
 <p1>这是与行标题分隔的段落文本。</p1>
 </body> 
</html>

The effect is as follows:

How to insert a line in HTML? A new explanation of html horizontal line tag hr

The above is how to insert a line in HTML? A new introduction to the html horizontal line tag hr. If you want to know more about HTML video tutorial, please pay attention to the php Chinese website.


The above is the detailed content of How to insert a line in HTML? A new explanation of html horizontal line tag hr. 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