Page 80 - CA_165_V2.0_Flipbook
P. 80

Notes

                          The WIDTH attribute is not supported in HTML5.




                  ALIGN Attribute
                  This attribute is used to align the horizontal (line) rule at the left, right or in center on the browser’s
                  window. By default, the horizontal rule takes center-alignment and covers entire browser’s window. The
                  left or right alignment becomes effective, if the size of the horizontal rule is changed i.e. size of the
                  horizontal ruler is not equal to the width of the page. The syntax for using the ALIGN attribute with the
                  <HR> tag is as follows:

                    <HR  ALIGN= "LEFT / RIGHT / CENTER">
                  For example:

                    <HR  ALIGN = "RIGHT"  WIDTH = "30%">
                    <HR  ALIGN= "CENTER"  WIDTH = "30%">
                    <HR  ALIGN = "LEFT"  WIDTH = "30%">
                           Notes


                          The ALIGN attribute is not supported in HTML5.


                  The following HTML code uses the <HR> tag with different alignments and width settings:

                  <HTML>
                  <HEAD>
                  <TITLE>
                  USING HR TAG
                  </TITLE>
                  </HEAD>
                  <BODY>
                  <HR  ALIGN="RIGHT" WIDTH="30%">
                  <HR ALIGN="CENTER" WIDTH="30%">

                  <HR ALIGN="LEFT" WIDTH="30%">
                  </BODY>
                  </HTML>
                  The output of the preceding HTML code is as follows:

                                       ALIGN = "LEFT"    ALIGN = "CENTER"     ALIGN = "RIGHT"
                                       WIDTH = "30%"       WIDTH = "30%"       WIDTH = "30%"















                    78   Touchpad Computer Applications-X
   75   76   77   78   79   80   81   82   83   84   85