Page 59 - CA 165 ver 1.0 Class 10
P. 59

LEFTMARGIN and TOPMARGIN Attribute
                 Margin refers to the blank space from the edge of a page. It is similar to the margin on the page of
                 a book. On the web pages the margin can be given with the help of LEFTMARGIN and TOPMARGIN
                 attribute. Syntax to use the LEFTMARGIN attribute is as follows:

                   <BODY LEFTMARGIN = “Value”> Where ‘value’ is in pixels.
                 For example:

                   <BODY LEFTMARGIN = “80” >
                 This will leave a blank space of 80 pixels from the left edge of the web page and the text will appear after
                 a blank gap of 80 pixels only.

                 Similarly, top margin can also be adjusted. Top margin is the blank space left from an upper edge of a
                 Web Page. Syntax to use the TOPMARGIN attribute is as follows:

                   <BODY TOPMARGIN = “Value” >
                 For example:
                   <BODY TOPMARGIN = “60” >



                                                                              Top margin (Blank area from
                                                                                the top of the Web Page)













                     Do you know?

                     Pixel stands for “Picture Element”. A pixel is a single point in a graphic  image. Graphics monitors
                     display pictures by dividing the display screen into thousands (or millions) of pixels, arranged in rows
                     and columns. On coloured monitors, each pixel is actually composed of three dots a red, a blue and
                     a green one.

                 Hence the complete Syntax of BODY tag along with its all discussed attributes is:

                    <BODY BGCOLOR=“#RRGGBB” TEXT=“#RRGGBB” BACKGROUND=“FILENAME.GIF”
                   LINK=“ #RRGGBB” ALINK=“#RRGGBB” VLINK=“#RRGGBB” LEFTMARGIN=“VALUE”
                   TOPMARGIN = “VALUE”>
                 Sometimes blank space is required in between the words in the text as most of the browsers do not
                 provide space of more than one column in between the words. “ ” or “ ” entities are used to
                 provide more than one column of space at a time on each occurrence. For example:

                   ORANGE_EDU         PUBLISHERS
                        [OR]
                   ORANGE_EDU       PUBLISHERS
                 The  above example will leave  three  column of  blank space  in between  the  word  ORANGE_EDU and
                 PUBLISHERS.


                                                                                         Introduction to HTML    57
   54   55   56   57   58   59   60   61   62   63   64