HTML caption

From Htmlpedia
Jump to: navigation, search


Definition and Usage

The element caption is used to add a headline to a table und must be placed after the element table. It is displayed on top of the table and will be read by screen readers before the content of the table. Can be formatted with CSS.


<table border="1">
  <caption>Highest Mountains</caption>
    <th>South America</th>
    <th>North America</th>
    <td>Mt. McKinley</td>
    <td>Mont Blanc</td>

Unformatted it will look like this:

Highest Mountains
South America North America Europe
Aconcagua Mt. McKinley Mont Blanc

Marctrix 19:58, 14 April 2007 (CEST)