Page 62 - CA_165_V2.0_Flipbook
P. 62

Similarly, if we select a color blue, then we will assign colour value as:

                  Red = 00 (Nil)                           Green=00 (Nil)                        Blue = FF (Full)

                  The table given below shows codes of different colours and their corresponding hexadecimal
                  RGB values:

                       COLOUR Name              HEX RGB Value            COLOUR Name              HEX RGB Value


                            Aqua                   # 00FFFF                   Black                  # 000000

                            Blue                   # 0000FF                    Grey                  # 808080

                            Green                  # 008000                   Lime                    # 00FF00

                           Maroon                  # 800000                   Purple                 # 800080

                             Red                   # FF0000                   Silver                 # C0C0C0


                            White                  # FFFFFF                   Yellow                  # FFFF00

                  For example:

                    <BODY BGCOLOR = "Aqua">  or              <BODY BGCOLOR = "#00FFFF">
                  In the above examples, both the values set the background colour as aqua on the screen i.e., in the
                  BGCOLOR attribute, either of the two i.e., colour name or HEX RGB values are accepted.
                  The following HTML  code uses the BGCOLOR attribute to change  the background  color of the
                  web page:

                  <HTML>

                  <HEAD>
                  <TITLE>
                  EXAMPLE OF BGCOLOR IN HTML
                  </TITLE>
                  </HEAD>

                  <BODY BGCOLOR="#ADD8E6">
                  <H1>
                  WELCOME TO MY WEB PAGE
                  </H1>

                  <P>
                  This is an example showing the use of the bgcolor attribute in the body tag.
                  </P>
                  </BODY>
                  </HTML>








                    60   Touchpad Computer Applications-X
   57   58   59   60   61   62   63   64   65   66   67