Page 89 - Computer - 7
P. 89

Property                Description                     Value(s)                    Example

                                Specifies the horizontal
           text-align                                          left, center, right, justify  text-align: center
                                alignment of text

                                                               normal (default),
                                                               number (multiplied with
                                                               the current font size to
                                                               set the line height),
                                Specifies the distance                                     line-height: normal
           line-height                                         length (fixed line spacing
                                between two lines                                          line-height: 6px
                                                               in px, pt or cm),
                                                               percentage value (line
                                                               height in percentage of
                                                               current value)

                                                                                           text-decoration:
                                                               none (default),
                                Specifies  the  type  of  line                             underline
           text-decoration                                     underline, overline,
                                that is added to the text                                  text-decoration:
                                                               linethrough
                                                                                           overline
                                Specifies the shadow           x-position y-position       text-shadow: 3px 3px
           text-shadow
                                effects for the text           colour                      blue

                                                               none (default), capitalize
                                Controls the                   (first character of each    text-transform:
           text-transform
                                capitalisation of the text     word in uppercase),         uppercase
                                                               uppercase, lowercase

          Let us learn about some of these properties in detail.



          Color Property
          The Color property is used to specify the colour of text for various text elements in a web page. You can
          specify a recognised colour name, a hexadecimal colour value, or a RGB colour value.

             •  Recognised colour names include red, green, yellow, pink, cyan, etc.
                 For example,

                                                       color: yellow
             •  Hexadecimal colour values are specified as #RRGGBB, where RR (red), GG (green), and BB (blue)
                are components of the colour and have values between 0 and FF.
                 For example,

                                                      color: #FF00FF
             •  RGB colour values are specified as rgb (red, green, blue), where each colour value can be from 0
                to 255 or a percentage from 0 to 100.

                 For example,

                                              color: rgb(111, 55, 165)
                                             color: rgb(50%, 100%, 25%)

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