Help:Table caption

The caption tag is used inside the HTML element "table". This can also be done indirectly using the code "|+" as part of the wikicode for a table.

It places texts above the table, by default. Texts can also be below, at the left or at the right side of the table, based on the "align" parameter's value.

{| border="0" width="100%"
 * colspan="2" style="vertical-align: middle" | In the rightside table, the texts This is a Caption showing a caption.
 * width="33%" |
 * width="20%" | Wiki code:
 * colspan="2" |
 * colspan="2" |


 * width="20%" | Html code:
 * colspan="2" |
 * colspan="2" |
 * }

A html &lt;caption&gt; tag can be created by using following wiki code: |+ Caption

which generates the following html code: &lt;caption&gt;Caption&lt;/caption&gt;

You can also use parameters in wiki code: |+ params|Caption

which will generate below html code: &lt;caption params&gt;Caption&lt;/caption&gt;

CSS box model equivalent: display: table-caption;

Caption tag accepts following parameters: align = "top|bottom|left|right" (Deprecated html parameter) (Html "align" is valid for ~IE 6).

Equivalent stylesheet parameter: style="caption-side: top|bottom|left|right|inherit;"

For a bottom side, right aligned caption texts: |+ align="bottom" style="caption-side: bottom; text-align: right;" | Caption at bottom