Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 100 - logicode 2609 C6
P. 100

    Code
                           4       Write the HTML code to present the given web page using background properties.

                      <!DOCTYPE HTML>

                      <HTML>
                      <HEAD>
                      <TITLE>Using Background Properties</TITLE>

                      </HEAD>
                                                                                                                PURE
                      <BODY  STYLE="BACKGROUND-IMAGE:                  In CSS, 1 inch is equal to 96 pixels.    FACT

                      URL('astronaut.jpg');
                      BACKGROUND-SIZE: 500px 500px;">

                      <H1 STYLE="
                      BACKGROUND-COLOR: MEDIUMPURPLE;">

                      Exploring the Universe</H1>
                      </BODY>
                      </HTML>
                      Note: Ensure that the astronaut.jpg file is in the same folder as the HTML file.

                                TEXT PROPERTIES

                      In CSS, text properties are used to style and control the appearance of text on a web page. The
                      table below lists some text properties, their corresponding values and descriptions:

                              Property Name                       Value                            Description

                                                      Any valid colour value           This property sets the text colour.
                       COLOR
                                                      (name, HEX, RGB and more)
                                                      LEFT, RIGHT, CENTER              This property  aligns the text
                       TEXT-ALIGN
                                                      and JUSTIFY                      horizontally.

                                                      CAPITALIZE, UPPERCASE,           This property  transforms text
                                                      LOWERCASE and NONE               to  uppercase,  lowercase or
                       TEXT-TRANSFORM
                                                                                       capitalises the first letter of each
                                                                                       word.
                                                      UNDERLINE, OVERLINE,             This property adds a line below,
                       TEXT-DECORATION
                                                      LINE-THROUGH and NONE            above or through text.
                                                      color, x-offset, y-offset,       This property adds a shadow
                       TEXT-SHADOW
                                                      blur-radius                      effect to the text.

                       98   Premium Edition-VI

| 95 96 97 98 99 100 101 102 103 104 105 |