HTML Horizontal Line
The HTML <hr> tag is used to divide a page into sections by creating a horizontal line that spans from the left to the right side of the page. This is an empty tag and does not require a closing tag or any additional attributes.
Syntax:
<hr>
Example 4: To illustrates the use of the <hr> tag for the horizontal line in HTML.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, initial-scale=1.0">
<title>HTML <hr> tag</title>
</head>
<body>
<h1>Hello w3wiki</h1>
<p>
A Computer Science portal for geeks<br>
A Computer Science portal for geeks<br>
A Computer Science portal for geeks<br>
</p>
<hr>
<p>
A Computer Science portal for geeks<br>
A Computer Science portal for geeks<br>
A Computer Science portal for geeks<br>
</p>
<hr>
<p>
A Computer Science portal for geeks<br>
A Computer Science portal for geeks<br>
A Computer Science portal for geeks<br>
</p>
<hr>
</body>
</html>
Output:
HTML Basics
HTML stands for Hyper Text Markup Language. It is the standard markup language for creating Websites. It is used to describe the structure of a Web page. HTML consists of elements that tell the browser how the content is displayed on the screen. We’ll walk you through fundamental HTML examples and teach you how to create a webpage. This HTML Basics covers fundamental HTML examples.
In this guide, the basics of HTML include learning HTML tags ( <h1>, <p>, <img>, etc), attributes, elements, and document structure which collectively form a working web page.
Table of Content
- Basic HTML Document
- HTML Headings
- HTML Paragraph and Break Elements
- HTML Horizontal Line
- HTML Images
- View HTML Source Code
Contact Us