Forum

Number Of Page View:100,000+/Months
LOGIN |New User

Reply

How to create headings and empty cells in table?
 Any thing that we write b/w <th>.....</th> tag are display as table heading.
Example:
<table border="1">
<tr>
<th>Heading of column 1</th>
<th>Heading of column 2</th>
<th>Heading of column 3</th>
</tr>
<tr>
<td>row 1, cell 1</td>
<td>row 1, cell 2</td>
</tr>
<tr>
<td>row 2, cell 1</td>
<td>row 2, cell 2</td>
</tr>
<tr>
<td>row 3, cell 1</td>
<td>row 3, cell 2</td>
</tr>

</table>
 than table will generated on web browser looks like,
Heading of column 1   Heading of column 2
row 1, cell 1 	      row 1, cell 2
row 2, cell 1 	      row 2, cell 2
row 3, cell 1 	      row 3, cell 2

 We can create an empty cell with in table like that,
<table border="1">
<tr>
<td>row 1, cell 1</td>
<td>row 1, cell 2</td>
</tr>
<tr>
<td>row 2, cell 1</td>
<td></td>
</tr>
<tr>
<td></td>
<td>row 3, cell 2</td>
</tr>

</table>
 Now, than our HTML table looks like,
row 1, cell 1 	row 1, cell 2
row 2, cell 1 	
                row 3, cell 2    
 If your does not show the border line around empty cell than you can write &nbsp;(called space) between the tags of empty cells.
Like:<td>&nbsp;</td>