Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 98 - 2611_SmartGPT Pro V(5.0) C-6
P. 98

    In CSS, the priority order is: inline > internal > external. This means that if you specify inline, internal
                      and external CSS for an element, the inline CSS will be applied first, followed by internal CSS and
                      then external CSS.

                           Tick ( ) if you know this.

                           ▶  CSS eliminates the need to repeat code in every HTML tag.
                           ▶  A combination of a property and its value is called a Declaration.

                              What are CSS, shorthand properties?

                                BACKGROUND PROPERTIES

                      CSS background properties style and control element backgrounds. The table shows properties,
                      values and descriptions:

                                Property
                                 Name                            Value                           Description

                                                      Any valid colour value (name,  This property sets the background
                       BACKGROUND-COLOR
                                                      HEX, RGB, HSL, etc.)             colour of an element.

                                                                                       This property sets an image as the
                       BACKGROUND-IMAGE               URL of image
                                                                                       background of an element.

                                                      REPEAT, NO-REPEAT, REPEAT-X,  This property determines how
                       BACKGROUND-REPEAT
                                                      REPEAT-Y                         background images are repeated.

                                                      LEFT, RIGHT, TOP, BOTTOM,  This property sets the position of
                       BACKGROUND-POSITION
                                                      CENTER or COORDINATES            the background image.

                                                      CONTAIN, COVER, AUTO,            This property specifies the size of
                       BACKGROUND-SIZE
                                                      HEIGHT/WIDTH in PX or %          the background within an element.

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

                      <!DOCTYPE HTML>
                      <HTML>

                      <HEAD>

                       96   Computer Science (V5.0)-VI

| 93 94 95 96 97 98 99 100 101 102 103 |