Basic HTML Version

|  | Table of Contents |  | View Full Version

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

    Code 7. Write the HTML code to present the given web page using CSS border properties.

                      <!DOCTYPE HTML>

                      <HTML>
                      <HEAD>

                      <TITLE>Using Border Properties

                      </TITLE>

                      </HEAD>
                      <BODY STYLE="BACKGROUND-COLOR: LIGHTGREEN;

                      FONT-FAMILY: 'ARIAL', SANS-SERIF;">

                      <H1 STYLE="COLOR: DARKGREEN;  TEXT-ALIGN:  CENTER;  FONT-SIZE:  40PX;
                      FONT-FAMILY:  'GEORGIA', SERIF;  FONT-WEIGHT:  BOLD; BORDER-WIDTH:  4PX;
                      BORDER-STYLE: SOLID; BORDER-COLOR: DARKGREEN;">The Importance of Trees
                      </H1>
                      <P STYLE="FONT-SIZE: 16PT; TEXT-ALIGN: JUSTIFY; COLOR: BROWN; BORDER-WIDTH:
                      3PX; BORDER-STYLE: DASHED; BORDER-COLOR: GREEN;">

                      Trees are essential to life on Earth. They provide oxygen, improve air
                      quality and offer shelter to various species.</P>
                      </BODY>

                      </HTML>

                                MARGIN PROPERTIES

                      In CSS, margin properties are used to create space around elements, outside of their borders.

                      The table below lists some margin properties, their corresponding values and descriptions:

                             Property
                               Name                          Value                              Description

                                                                                    It sets the margin space on the top side
                       MARGIN-TOP                Value in pixels or percentage
                                                                                    of an element.
                                                                                    It sets the margin space on the right
                       MARGIN-RIGHT              Value in pixels or percentage
                                                                                    side of an element.
                                                                                    It sets the margin space on the
                       MARGIN-BOTTOM             Value in pixels or percentage
                                                                                    bottom side of an element.

                                                                                    It sets the margin space on the left
                       MARGIN-LEFT               Value in pixels or percentage
                                                                                    side of an element.

                       MARGIN                    Value in pixels or percentage      It sets the margin for all four sides.

                      100   Computer Science (V5.0)-VI

| 97 98 99 100 101 102 103 104 105 106 107 |