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>
JS in Depth
XAH  BUY NOW

HTML Basics

HTML Table

Misc

HTML4 Frameset