Home HTML Tutorial for beginners 8 HTML hr tag

8 HTML hr tag

32
0

The <hrtag in HTML stands for horizontal rule and is used to insert a horizontal rule. In HTML5, <hr> tag defines a thematic break in an HTML page to divide or separate document sections. The <hrtag is an empty tag and it does not require an end tag. But closing it like <hr/> is a good practice.

We will write a program to demonstrate hr tag.

<html>
<head>
<title>Program to demonstrate hr tag.</title>
</head>
<body>
<
h1>
HTML</h1>

<p>HTML is a language for describing web pages.....</p>

<hr>

<h1>CSS</h1>
<p>CSS defines how to display HTML elements.....</p>
</body>
</html>

Check your progress :

Q) In HTML5, <hr> tag is used to insert a thematic break in a document.

  • True
  • False

Q) Closing of hr like : <hr/> is a good practice.

  • True
  • False

 

 

LEAVE A REPLY

Please enter your comment!
Please enter your name here