Page 99 - TP_iPlus_V2.1_Class6
P. 99

You  can  also  use  the  6  digits  hexadecimal  code  in  place  of  colour  name.  For  example,  the
                 hexadecimal code #000000 represents the black colour and #FFFFFF represents the white colour.
                 For example:

                 body{background-color: #000000;}

                    Quick Byte

                     You can easily get hexadecimal code of any colour from colour picker. Type colour
                     picker in google and select any colour to get the hexadecimal code.



                 You can also set an image as the background of a web page by using the background-image
                 property of CSS in the following manner:

                 body{background-image:url(“background.jpg”);}


                  i +  TEXT PROPERTIES

                 CSS  provides  text  properties  that  are  used  to  change  the  appearance  of  the  text.  The  text
                 properties and their values used with the style attribute are given below:

                    Property                    Value                                 Description
                                                                      Specifies the text colour to be used on the
                 color             Name of the colour
                                                                      web page
                 text-align        left, right, center, justify       Specifies the alignment of the text

                                                                      Specifies the indentation of the first line of
                 text-indent       length in pixels or percentage
                                                                      the text
                                   underline, overline or             Specifies the text effects like underline,
                 text-decoration
                                   strikethrough                      overline or strike-through

                                   capitalize, uppercase,             Specifies the transformation of text into
                 text-transform
                                   lowercase and none                 uppercase, lowercase or title case

                 Create an HTML5 web page by using the text properties.

                 <!DOCTYPE html>
                 <HTML>

                 <HEAD> <TITLE>Text Properties</TITLE>
                 <STYLE>
                 H1{font-family:Comic Sans MS; text-align:center;

                 text-decoration:underline;color:red}
                 </STYLE>

                 </HEAD>
                 <BODY>
                 <H1>Earth</H1>



                                                                                                                  97
                                                                                        HTML—An Introduction
   94   95   96   97   98   99   100   101   102   103   104