Home >>HTML Tutorial >HTML Table
<table> <tr> <td>row1col1</td> <td>row1col2</td> </tr> </table>Try it Yourself
<table> <tr> <td>row1col1</td> <td>row1col2</td> </tr> </table>Try it Yourself
<table border="1"> <tr> <th>Name</th> <th>Email</th> </tr> <tr> <td>phptpoint</td> <td>phptpoint@gmail.com</td> </tr> <tr> <td>phptpoint blog</td> <td>blog@gmail.com</td> </tr> </table>Try it Yourself In the above example a table is created have 3 rows and 6 columns where each row contains 2 column. <tr> tag is used to create a row while <td> or <th> is used to create column. <tr> comes in between <table> tag while <td> or <th> comes in between <tr>.
<table border="1"> <tr> <th colspan="2"> User Details</th> </tr> <tr> <th>Name</th> <th>Email</th> </tr> <tr> <td>phptpoint</td> <td>phptpoint@gmail.com</td> </tr> <tr> <td>phptpoint blog</td> <td>blog@gmail.com</td> </tr> </table>
<table border="1"> <tr> <td rowspan="2"> </td> <td> </td> </tr> <tr> <td> </td> </tr> </table>
<html> <body> <table border="1" bgcolor="gray" width="200" height="200"> <tr> <th> <table align="center" border="1" bgcolor="#F8F8F8" width="100" height="100"> <tr> <th>Inner Table</th> </tr> </table> </th> </tr> </table> </body> </html>