Page 90 - Computer - 7
P. 90

Consider the code given below:
                                              <style type = ‘‘text/css’’>

                                              p {color: #FF0000}
                                              h1 {color: orange}
                                              </style>

          The above code specifies to the browser that the paragraph text is in red colour and heading level one
          is in orange colour.
                                       Hexadecimal Values of some common colours

                 Colour             Hexadecimal Value                    Colour               Hexadecimal Value

                  Black                   #000000                         Blue                      #0000FF

                  Cyan                    #FF00FF                         Red                       #FF0000

                 Green                    #00FF00                        White                      #FFFFFF

                Maroon                    #800000                        Yellow                     #FFFF00



          Text-align Property
          The text-align property is used to control the horizontal positioning of blocks of text in a web page.
          You can align text to the left, right, center, or justified. By default, most web browsers align text to the left.

          Consider the code given below :
                                              <style type = ‘‘text/css’’>
                                              p {text-align: right}

                                              h1 {text-align: center}
                                              h4 {text-align: justify}
                                              </style>

          The above code specifies the browser that paragraph text is right aligned, heading level one is centre
          aligned, and heading level four is justify aligned.

          Text-shadow Property

          The text-shadow property is used to apply shadow to the text. The value of the text-shadow property
          is given as:

                                   text-shadow: h-shadow  v-shadow  color
          where, h-shadow specifies the position of horizontal shadow in pixels, v-shadow specifies the position
          of the vertical shadow in pixels, and color specifies the colour of the shadow.
          For example,

                                            text-shadow: 3px 4px orange
          Here, 3px specifies the position of the horizontal shadow in pixels, 4px specifies the position of the
          vertical shadow in pixels, and orange specifies the colour of the shadow.


               88
   85   86   87   88   89   90   91   92   93   94   95