Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 47 - CoreGPT(Podar)_Flipbook_C8
P. 47

    In the preceding code, we have seen that rows are created by using the <TR> tag. Rows are
                     further divided into cells by using the <TD> tag. These cells contain data of the table. The output

                     of the preceding code is shown:

                                                                 Creating table
                     Let us create another program by using the COLSPAN attribute of the table.

                     <HTML>
                     <HEAD>
                     <TITLE> TABLE WITH COLSPAN </TITLE>

                     </HEAD>
                     <BODY BGCOLOR = "LIGHTPINK">
                     <TABLE BORDER = "3" BORDERCOLOR = "GREEN">

                     <CAPTION>BILL</CAPTION>
                     <TR>
                     <TH>ITEMS</TH>

                     <TH>QUANTITY</TH>
                     <TH>UNIT PRICE</TH>
                     <TH>PRICE</TH>

                     </TR>
                     <TR>
                     <TD>Pencils</TD>

                     <TD>100</TD>
                     <TD>1.15</TD>

                     <TD>115.00</TD>
                     </TR>
                     <TR>

                     <TD>Geometry Boxes</TD>
                     <TD>10</TD>
                     <TD>45.99</TD>

                                                                   Working with Lists, Images and Tables in HTML         45

| 42 43 44 45 46 47 48 49 50 51 52 |