naar onze homepage
 HTML
Home
 Tables:

Caption > Een kopje boven een tabel.
Een opschrift kan met behulp van <caption>...</caption> boven de inhoud van een tabel gezet worden.

Voorbeeld

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>De structuur van een tabel</title>
</head>
<body>

<h3>Een tabel met kader</h3>
<table border="1">

<caption><i><b>De Steden</b></i></caption>

<tr>
<th>Amsterdam</th>
<th>Volendam</th>
<th>Edam</th>
</tr><tr>
<td>Damrak</td>
<td>Dijk</td>
<td>Kaasmarkt</td>
</tr><tr>
<td>Patat</td>
<td>Haring</td>
<td>Kaas</td>
</tr>
</table>

<h3>De tabel zonder kader, een z.g. "blinde" tabel</h3>
<table border="0">

<caption><i><b>De Steden</b></i></caption>

<tr>
<th>Amsterdam</th>
<th>Volendam</th>
<th>Edam</th>
</tr><tr>
<td>Damrak</td>
<td>Dijk</td>
<td>Kaasmarkt</td>
</tr><tr>
<td>Patat</td>
<td>Haring</td>
<td>Kaas</td>
</tr>
</table>
</body>
</html>

Zo ziet het er in het echt uit!

Opmerking:
<caption></caption> moet direct na het <table>-element worden geplaatst.

top