Br Tag

Hr stands for (Horizontal Rules). In HTML if we want to create a horizontal line then we use Hr tag. Hr are used for separate the content on html page, the tag defines a thematic break. In HTML 4.01, the tag represents a horizontal rule. However, the tag may still be displayed as a horizontal rule in visual browsers, but is now defined in semantic terms, rather than presentational terms.

Lets take an example.

Example

<html>
<body>
<h1>Codingknack</h1><hr>
<h2>C, C++, Python</h2><hr>
<h3>Html and CSS</h3>
</body>
</html>

hr-tag-in-html

In this example we use hr tag after <h1>, <h2> and <h3> tag. And in result we get a horizontal line after every heading.

Result

Codingknack


C, C++, Python


Html and CSS

display-hr-tag-in-html

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close Menu