Page 127 - CA_165_V2.0_Flipbook
P. 127

For example:

                   <TH>ROLL NO</TH>
                   <TH>FIRST NAME</TH>
                   <TH>LAST NAME</TH>
                 To create a heading (column heading) at the top of the table, you can first create a row using the ‘TR’ tag
                 and then use the ‘TH’ tag to define the cell as heading instead of using the ‘TD’ tag.
                 The following HTML code uses the <TABLE> tag to create a table with two rows and three columns,
                 displaying cities and their famous landmarks:

                 <HTML>
                 <HEAD>

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

                 <BODY BGCOLOR = "YELLOW">
                 <TABLE

                 <TR>
                 <TH>ROLL NO</TH>
                 <TH>FIRST NAME</TH>

                 <TH>LAST NAME</TH>
                 <TH>ADDRESS</TH>

                 </TR>
                 <TR>

                 <TH>1</TH>
                 <TD>ASHA</TD>

                 <TD>NAYER</TD>
                 <TD>MANGALORE</TD>

                 </TR>
                 <TR>

                 <TH>2</TH>
                 <TD>SANTY</TD>
                 <TD>PAUL</TD>

                 <TD>MANIPAL</TD>
                 </TR>

                 </TABLE>
                 </BODY>

                 </HTML>





                                                                                            More About HTML      125
   122   123   124   125   126   127   128   129   130   131   132