How to use complete horizontal line space in HTML ? (original) (raw)
Last Updated : 23 Jul, 2025
In this article, we will create a complete horizontal line space using HTML. To create the horizontal line space, we will use the
tag.
The
tag stands for horizontal rule and is used to insert a horizontal rule or a thematic break in an HTML page to divide or separate document sections. The
tag is an empty tag, and it does not require an end tag.
Syntax:
Attributes: The following attributes with their values are described below:
- align: It specifies the alignment of the horizontal rule.
- noshade: It specifies the bar without shading effect.
- size: It specifies the height of the horizontal rule.
- width: It specifies the width of the horizontal rule.
Approach: In the below example, we will create two paragraph elements containing some content and add a
tag between these two paragraph elements to create a horizontal line space.
Example: In this example, we will use
for creating a horizontal line.
HTML `
How to use complete horizontal line space in HTML?GeeksforGeeks
How to use complete horizontal line space in HTML?
Welcome to GeeksforGeeks
Learning portal
`
Output: