In the XHTML markup language, the caption element is part of creating tables. This element is used immediately following the opening table tag as a means of describing the general contents of the table to nonvisual user agents. The caption element must immediately follow the opening table tag , and there can only be one caption per table. Unlike the title in relation to the head, the caption is actually visible on the page when viewed through a browser.

For example:
When creating a table which shows a list of reindeer, the code would read something like this.

<table>
<caption>A list of Reindeer</caption>
<tr><td>Rudolph</td>
</tr><tr><td>Prancer</td>
</tr><tr><td>Dasher</td>
</tr><tr><td>Comet</td>
</tr></table>

And would look something like this:


A list of Reindeer
Rudolph
Prancer
Dasher
Comet

An additional attribute would be the alignment:
left
right
top
bottom


Page Information

  • 11 months ago [history]
  • View page source
  • You're not logged in
  • No tags yet learn more

Wiki Information

Recent PBwiki Blog Posts