Page 128 - CA_165_V2.0_Flipbook
P. 128

The output of the preceding HTML code is as follows:






                                                                                                 First row of the
                                                                                                table as heading.






                  Attributes of <TABLE> Tag

                  The following attributes are used with <TABLE> tag:
                    BORDER                 CELLPADDING                   CELLSPACING

                    HEIGHT                 WIDTH                         BGCOLOR                ALIGN Attribute

                  BORDER Attribute
                  This attribute is used to insert border in the table for its rows and columns. The thickness of the border is
                  specified by the value of number. By default, the thickness of the border is ‘1’. Syntax to use the BORDER
                  attribute of the <TABLE> tag is as follows:

                    <TABLE BORDER = "Value">
                  For example:

                    <TABLE BORDER="2">
                  The following HTML code uses the <TABLE> tag with a BORDER attribute  to create a table with two rows
                  and four columns, displaying cities and their famous landmarks:

                  <HTML>
                  <HEAD>
                  <TITLE> Working with Table</TITLE>

                  </HEAD>
                  <BODY BGCOLOR = "YELLOW">
                  <TABLE BORDER = "2" >
                    <TR>

                                       <TD> DELHI </TD>
                                       <TD> MUMBAI </TD>
                                       <TD> KOLKATA</TD>

                                       <TD> CHENNAI</TD>
                    </TR>
                    <TR>
                                       <TD> INDIA GATE </TD>
                                       <TD> GATEWAY OF INDIA </TD>

                                       <TD> VICTORIA MEMORIAL </TD>
                                       <TD> Fort St. George </TD>

                   126   Touchpad Computer Applications-X
   123   124   125   126   127   128   129   130   131   132   133