DEV Community

Charity Parks
Charity Parks

Posted on

Lets talk (HTML) Tables!

Tables are visually appealing. Tables deliver information in such a way that is intuitive and user-friendly and easily consumed in a grid-style format. Information at a glance if you will.

Lets look at how to use HTML to format a table. Each block (in the grid) is called a table cell. The <table> element is used. Tables are written out row by row. To start out each row you will use the <tr> tag which stands for the table row. Inside the <tr> will be a series of <td> elements. <td> stands for table data. Each representing a row cell. After each cell, make sure to add a closing tag (</td>).

For example:

<table>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
<tr>
<td>4</td>
<td>5</td>
<td>6</td>
</tr>
</table>

the result:
123
456

Happy Coding!

Top comments (0)