Page 123 - CodePilot V5.0 C6
P. 123

<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

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

                    Code
                      8      Write the HTML code to present the given web page using CSS margin properties.


                 <!DOCTYPE HTML>
                 <HTML>

                 <HEAD>
                 <TITLE>Using Margin Properties
                 </TITLE>

                 </HEAD>
                 <BODY STYLE="BACKGROUND-COLOR: #F0F8EF; COLOR: DARKSLATEGRAY;">
                 <H2 STYLE="COLOR: MEDIUMBLUE; TEXT-ALIGN:CENTER;">The Human Digestive
                 System</H2>

                 <P STYLE="BORDER: 1PX SOLID GREEN; FONT-SIZE: 14PT; MARGIN-TOP: 25PX;
                 MARGIN-LEFT: 30PX;">



                                                                                                                  121
                                                                                                CSS3–Styling Basics
   118   119   120   121   122   123   124   125   126   127   128