Tuesday, 7 March 2023

HR and BR Tag

HTML hr tag

HTML <hr> tag is used to specify a paragraph-level thematic break in HTML document. It is used when you abruptly change your topic in your HTML document. It draw a horizontal line between them. It is also called a Horizontal Rule in HTML.

HR tag is used to draw a horizontal line within the texts to separate content.

HTML <br> tag

The <br> tag in HTML document is used to create a line break in a text.

It is generally used in poem or address where the division of line is necessary. It is an empty tag, which means it does not need a company of end tag. If you place the <br> tag in the HTML code, then it works the same as pressing the enter key in a word processor.

Example:

<html>

                <head>

                                <title>Body and its attribute</title>

                </head>

                <body bgcolor="pink">

                    

                                 <center>

                                   <hr color="red">

                                      <p> This is Raj from jaipur <br>

                                              i like to play cricket    <br>

                                              i like to watch movie  <br>

                                      </p>

                                   <hr color="red">

                                 </center>

                </body>

</html>


 

No comments:

Post a Comment

Full Form of IT and ITes Industry

                                                 Full Form (IT and ITeS) ICT - Information Communication Technology IT - Information Tec...