HTML Table Examples

By Xah Lee. Date: . Last updated: .

Table example 1

A B C
D E F

Here's the source code:

<table border="1">
<tr>
<td>A</td>
<td>B</td>
<td>C</td>
</tr>
<tr>
<td>D</td>
<td>E</td>
<td>F</td>
</tr>
</table>

Table Example With Column Span

A B and C
D E F

Here's the source code:

<table border="1">
<tr>
<td>A</td>
<td colspan="2">B and C </td>
</tr>

<tr>
<td>D</td>
<td>E</td>
<td>F</td>
</tr>
</table>

Table Example With Row Span

A and D B C
E F

Here's the source code:

<table border="1">
<tr>
<td rowspan="2">A and D</td>
<td>B</td>
<td>C</td>
</tr>

<tr>
<td>E</td>
<td>F</td>
</tr>
</table>

Table Topic

  1. HTML Table Examples
  2. HTML Table, thead, tbody, tfoot
  3. HTML Table, colgroup, col
  4. Styling HTML Table with CSS
  5. CSS: 3 Columns Page Layout
  6. Pure CSS Table
Liket it? Put $5 at patreon.

Or, Buy JavaScript in Depth

Ask me question on patreon