Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 103 - logicode 2609 C6
P. 103

    THICK,  THIN, MEDIUM,  Numeric  This property sets the width of
                     BORDER-WIDTH
                                                    values with PX or EM                 an element’s border.

                                                    Colour name, RGB values or hex       This property  sets  the  colour
                     BORDER-COLOR
                                                    code values                          of an element’s border.

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

                     <!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
                     MARGIN-TOP                     Value in pixels or percentage
                                                                                         top side of an element.
                                                                                         It sets the margin space on the
                     MARGIN-RIGHT                   Value in pixels or percentage
                                                                                         right side of an element.

                                                                                                   CSS3–Styling Basics  101

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