<table>

Description

This element creates a table that can contain rows and columns. The <tr> element creates rows in the table. The <td> element creates the cells in each table row.

Example


<html>
<body>
     <table>
          <tr>
               <td>col 1: maroon</td>
               <td>col 2: red</td>
          <tr>
               <td>col 1: maroon</td>
               <td>col 2: red</td>
          </tr>
     </table>
</body><!--   ww  w .j a v a2  s  .  c o  m-->
</html>

Click to view the demo

The code above generates the following result.

table




















Home »
  HTML CSS »
    HTML CSS Reference »




HTML Tag Reference
CSS Reference
CSS Selector Reference
Encoding Reference