Page 81 - CA_165_V2.0_Flipbook
P. 81

COLOR Attribute
                 This attribute is used to  set  the  colour  of the  horizontal  (line)  rule.  The  syntax  for  using the  COLOR
                 attribute with the <HR> tag is as follows:

                   <HR COLOR="COLOUR NAME">
                 For example:

                   <HR COLOR="BLUE">

                         Notes

                         The COLOR attribute is not supported in HTML5.



                 The following HTML code uses the <HR> tag with various attributes such as SIZE, WIDTH, ALIGNMENT,
                 COLOR, NOSHADE:

                 <HTML>

                 <HEAD>
                 <TITLE>

                 USING HR TAG WITH ITS ATTRIBUTES

                 </TITLE>
                 </HEAD>

                 <BODY TEXT="RED">

                 ORANGE EDUCATION
                 <HR SIZE=15 WIDTH="45%" ALIGN ="LEFT" COLOR="BLUE" NOSHADE>

                 A Complete Computer Applications Reference Book

                 </BODY>

                 </HTML>
                 The output of the preceding HTML code is as follows:




                   Horizontal Rule (HR) displays as:
                   Color - Blue
                   Noshade
                   Size - 15
                   Width - 45%
                   Alignment - Left













                                                                                         Introduction to HTML    79
   76   77   78   79   80   81   82   83   84   85   86