Page 25 - PortGPT_V2.1_C7_Flipbook
P. 25

Let’s catch uP

                   Which property is used to align the text?

                   _______________________________________________________________________________________

                   _______________________________________________________________________________________


                        BACKGROUND PROPERTIES


                 The background properties are used to make changes in the background of a web page. 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 web page.

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


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

                 Create an HTML5 web page by using the background properties.

                 <!DOCTYPE html>
                 <HTML>
                 <HEAD>
                 <STYLE>
                 BODY {background-image: url("D:\tile.png");
                 background-repeat:repeat-y;}
                 H1 {background-color:green;
                 text-align:center;}
                 </STYLE>
                 </HEAD>



                                                                                                  More on HTML5    23
   20   21   22   23   24   25   26   27   28   29   30