Important Definition :
<Table>......</Table> : defines a TABLE in HTML. Attributes are border, bgcolor
<TR>....</TR> : It specifies the table row in the table
<TH>....</TH> : It defines the table's Header cell. By default the text in the cell is bold and
centered
<TD>....</TD> : It defines the table data cell. By default the text in the cell is is aligned left and centered vertically.
Attributes for TD, TH, TR are :
ALIGN(left, Center, Right) : Horizontal alignment of the cell
VALIGN(top, middle, bottom) : Vertical alignment of the cell
COLSPAN=n : The Merged n number of columns in the cell
ROWSPAN=n : The Merged n number of rows in the cell
eg.
<html>
<head>Price List </head>
<body>
<table border=1>
<tr>
<th><b> ITEM CODE</b> </th>
<th><b> ITEM NAME</b> <//th>
<th><b>ITEM PRICE</b> <//th>
</tr>
<tr>
<td> CT-01</td>
<td>Color TV</td>
<td>Rs. 25000/-</td>
</tr>
<tr>
<td>CT-02</td>
<td>Camera</td>
<td>Rs. 5000/-</td>
</tr>
<tr>
<td>CT-03</td>
<td>Video Camera</td>
<td>Rs. 15000/-</td>
</tr>
<tr>
<td>CT-04</td>
<td>Computer</td>
<td>Rs. 25000/-</td>
</tr>
<tr>
<td>CT-05</td>
<td>TABLET</td>
<td>Rs. 8000/-</td>
</tr>
</table>
</body>
</html>
<Table>......</Table> : defines a TABLE in HTML. Attributes are border, bgcolor
<TR>....</TR> : It specifies the table row in the table
<TH>....</TH> : It defines the table's Header cell. By default the text in the cell is bold and
centered
<TD>....</TD> : It defines the table data cell. By default the text in the cell is is aligned left and centered vertically.
Attributes for TD, TH, TR are :
ALIGN(left, Center, Right) : Horizontal alignment of the cell
VALIGN(top, middle, bottom) : Vertical alignment of the cell
COLSPAN=n : The Merged n number of columns in the cell
ROWSPAN=n : The Merged n number of rows in the cell
eg.
<html>
<head>Price List </head>
<body>
<table border=1>
<tr>
<th><b> ITEM CODE</b> </th>
<th><b> ITEM NAME</b> <//th>
<th><b>ITEM PRICE</b> <//th>
</tr>
<tr>
<td> CT-01</td>
<td>Color TV</td>
<td>Rs. 25000/-</td>
</tr>
<tr>
<td>CT-02</td>
<td>Camera</td>
<td>Rs. 5000/-</td>
</tr>
<tr>
<td>CT-03</td>
<td>Video Camera</td>
<td>Rs. 15000/-</td>
</tr>
<tr>
<td>CT-04</td>
<td>Computer</td>
<td>Rs. 25000/-</td>
</tr>
<tr>
<td>CT-05</td>
<td>TABLET</td>
<td>Rs. 8000/-</td>
</tr>
</table>
</body>
</html>
No comments:
Post a Comment