Tags
Tables in HTML are relatively simple to create and modify. This is done using the tags:
- <table> to declare a table.
- </table> to end the table.
- <tr> to declare the start of a new row.
- <th> to declare the start of a new table header
- </th> to declare the end of a table header
- </tr> to declare the end of a row.
- <td> to declare a cell.
- </td> to close a cell.
Use
The code:
<table>
<tr>
<td>TITLE 1</td>
<td>TITLE 2</td>
</tr>
<tr>
<td>Contents 1</td>
<td>Contents 2</td>
</tr>
<tr>
<td>Contents 3</td>
<td>Contents 4</td>
</tr>
</table>
<table>
<tr>
<td>TITLE 1</td>
<td>TITLE 2</td>
</tr>
<tr>
<td>Contents 1</td>
<td>Contents 2</td>
</tr>
<tr>
<td>Contents 3</td>
<td>Contents 4</td>
</tr>
</table>
Will output:
TITLE 1 | TITLE 2 |
Contents 1 | Contents 2 |
Contents 3 | Contents 4 |
Example :
No comments:
Post a Comment