Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 131 - 2612 Digimind C6
P. 131

    Create an HTML web page 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>

                               FONT PROPERTIES

                     The font properties are used to change the font family, font size and font style of the text. The
                     various font properties and their values are given in the table:

                          Property                              Value                             Description

                      font-family          Name of the font                               Specifies the font to be used.
                                           Value is given in pixels. The default font size for  Specifies  the font size  used
                                           the text is 16 px. HTML also allows us to specify  on the web page.
                      font-size            the size in em or percentage, where 1 em =

                                           16px and the percentage is given in percent
                                           for the default font size in the <body> element.
                      font-style           normal, italic                                 Specifies the style of the font.

                     Create an HTML web page by using font properties.

                     <!DOCTYPE html>
                     <HTML> <HEAD> <STYLE>
                     H1 {color: blue; font-family: verdana; font-size: 32px; text-align:
                     center}

                                                                                                Formatting a Web Page  129

| 126 127 128 129 130 131 132 133 134 135 136 |