Page 25 - KEC Khaitan C7 Flipbook
P. 25

uiz   Bee        Which CSS property is used to align the text?
                                          _________________________________________________________________








                           BACKGROUND PROPERTIES

                 The background properties are used to make changes to the background of an HTML element.
                 The various background properties and their values are given in the table.



                        Property                        Value                             Description



                                                                              Specifies the background colour to
                  background-color          Name of the colour
                                                                              be used on the webpage.

                                                                              Specifies the image to be used in the
                  background-image          URL of image
                                                                              background on the webpage.

                                            repeat, repeat-x, repeat-y,
                  background-repeat         (whereas, x- horizontal &         Specifies the repetition of an image
                                            y-vertical) no repeat             on the webpage.


                 Create an HTML webpage by using the background properties.

                 <!DOCTYPE html>

                 <HTML>

                 <HEAD>
                 <STYLE>
                 BODY {background-image: url("Save water.jpg");
                 background-repeat:repeat-y;}

                 H1 {background-color:green;
                 text-align:center;}

                 </STYLE>
                 </HEAD>

                 <BODY>
                 <H1>SAVE WATER</H1>

                 </BODY>
                 </HTML>




                                                                                            Formatting a Webpage  23
   20   21   22   23   24   25   26   27   28   29   30