Page 95 - TGPT_V5.0_C5_Flipbook
P. 95

Let’s see the below example:


















                 The <HR> Tag

                 The <HR> tag is used when you want to divide your web page into different sections. It is also used

                 when you want to draw a line between two paragraphs. It is an empty tag and does not need an end
                 tag. It gives a horizontal ruler (line) on the page, and then the next element will be shown in a new
                 line after the ruler.
                 <!DOCTYPE html>

                 <html>
                 <head>

                     <title>HR Tag Example</title>
                 </head>

                 <body>
                     <p>This is the first paragraph of the tag.</p>

                     <hr>
                     <p>This is the second paragraph of the tag.</p>

                     <hr>
                 </body>

                 </html>
















                 Nesting of Tags

                 Nesting of tags means that you can start a new tag before closing the previous tag. The only
                 point to remember is that tags are nested on LIFO principle, that is, Last In First Out. This
                 means that the tag that has been opened last needs to be closed first.



                                                                                              Introduction to HTML5  93
   90   91   92   93   94   95   96   97   98   99   100