Page 159 - CG_v2.1_flipBooks_class_6
P. 159

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. The <HR> tag has width, size, and color attributes to modify the
                 horizontal ruler (line).

                 <!DOCTYPE HTML>

                 <HTML>

                 <HEAD>
                 <TITLE> HR Tag </Title>

                 </HEAD>

                 <BODY>

                 <p>This is the first paragraph of the tag. HTML is the standard markup language
                 for Web pages. </p>
                 <hr Size=”10” width=”80%” >

                 <p>This is the second paragraph of the tag.HTML is the standard markup language
                 for Web pages.</p>

                 <hr Size=”10” width=”80%” color=”grey”>
                 <hr Size=”10” width=”80%” color=”Red”>

                 </BODY>

                 </HTML>
















                 The <SUP> Tag

                                                                                                           2
                 The <SUP> tag is used to turn the enclosed text into a superscript. For example, E=mc  is coded
                 as E=mc<sup>2</sup>

                 The <SUB> Tag

                 The  <SUB>  tag  is  used  to  turn  the  enclosed  text  into  a  subscript.  For  example,  H O  is  coded
                                                                                                         2
                 as H<sub>2</sub>O




                                                                                        Introduction to HTML  157
   154   155   156   157   158   159   160   161   162