Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 24 - 2615_KEC
P. 24

    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.

                      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>

                       22   Premium Edition-VII

| 19 20 21 22 23 24 25 26 27 28 29 |