Page 101 - iPrime_V2.2_class6
P. 101

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;}
                          Tech Funda



                       You can easily get hexadecimal code of any colour from color picker. Type color 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”);}

                     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>



                                                                                         HTML—An Introduction      99
   96   97   98   99   100   101   102   103   104   105   106