Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

venkatesh.mansani@yahoo.

com Naresh i Technologies

table tags
HTML Tables:
HTML tables allow web developers to arrange the data into rows and
columns.

Table Tags:
1) <table> .... </table> => It is used to define a table.
2) <tr> .... </tr> => It is used to define a row in a table.
3) <th> .... </th> => It is used to define haeader cell in a table.
4) <td> .... </td> => It is used to define data cell in a table.
5) <caption> .... </caption> => It is used to define caption of the table.
6) <colgroup> .... </colgroup> => It is used to specify one or more
columns as a group for formatting.
7) <col> => It is used to specify column property for each column.
8) <thead> ... </thead> => It is used to group the header content in a
table.
9) <tbody> ... </tbody> => It is used to group the body content in a
table.
10) <tfoot> ... </tfoot> => It is used to group the footer content in a
table.

colspan example:
<html>
<body>

Java By Venkatesh Mansani venkatesh.mansani@yahoo.com


venkatesh.mansani@yahoo.com Naresh i Technologies

<table border=20 width=200>


<tr><td colspan=2 align=center>1</td></tr>
<tr><td>2</td><td>3</td></tr>
</table>
</table>
</body>
</html>

rowspan example:
<html>
<body>
<table border=20 width=200>
<tr><td rowspan=2>1</td><td>2</td></tr>
<tr><td>3</td></tr>
</table>
</table>
</body>
</html>

rowspan & colspan example:


<html>
<body>
<table border=20 width=200>
<tr><td rowspan=2 colspan=2>1</td><td>2</td></tr>

Java By Venkatesh Mansani venkatesh.mansani@yahoo.com


venkatesh.mansani@yahoo.com Naresh i Technologies

<tr><td>3</td></tr>
<tr><td>4</td><td>5</td><td>6</td></tr>
</table>
</table>
</body>
</html>

By

Mr. Venkatesh Mansani


Naresh i Technologies

Java By Venkatesh Mansani venkatesh.mansani@yahoo.com

You might also like