Changes
h:h + h:f
{{H:h}} [[Category:Editor handbook]]
'''Caption''' tag is a part of [[m:HTML element#Tables|Table]] (html) tag. It places texts above the table, by default. Texts can also be at below, left or 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%" |
{| border="1"
|+ This is a Caption
! Data-Type-1 !! Data-Type-2
|-
| Data-1a || Data-2a
|-
| Data-1b || Data-2b
|}
|-
| width="20%" | Wiki code:
| colspan="2" | <pre><nowiki>
{| border="1"
|+ This is a Caption
! Data-Type-1 !! Data-Type-2
|-
| Data-1a || Data-2a
|-
| Data-1b || Data-2b
|}
</nowiki></pre>
|-
| width="20%" | Html code:
| colspan="2" | <pre><nowiki>
<table border="1">
<caption> This is a Caption </caption>
<tr>
<th> Data-Type-1 </th><th> Data-Type-2 </th>
</tr><tr>
<td> Data-1a </td><td> Data-2a </td>
</tr><tr>
<td> Data-1b </td><td> Data-2b </td>
</tr>
</table>
</nowiki></pre>
|}
A html '''<caption>''' tag can be created by using following wiki code:
|+ Caption
which generates the following html code:
<caption>Caption</caption>
You can also use parameters in wiki code:
|+ ''params''|Caption
which will generate below html code:
<caption ''params''>Caption</caption>
[[en:Cascading Style Sheets|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 ~[[en:Internet Explorer|IE]] 6).
Equivalent [[en:Cascading Style Sheets|stylesheet]] parameter:
style="caption-side: top|bottom|left|right|inherit;"
{| border="0" width="100%"
| colspan="2" style="vertical-align: middle" | In the rightside table, the texts '''Caption at bottom''' showing a bottom side caption.
|
{| border="1"
|+ align="bottom" style="caption-side: bottom" | Caption at '''bottom'''
! Data-Type-1 !! Data-Type-2
|-
| Data-1a || Data-2a
|-
| Data-1b || Data-2b
|}
|-
| width="10%" | Wiki code:
| colspan="2" style="border: 1px dashed #2f6fab; background-color: #f9f9f9;" | <tt><nowiki>
{| border="1"</nowiki><br /><nowiki>
|+ align="bottom" style="caption-side: bottom" | Caption at '''bottom'''</nowiki><br /><nowiki>
! Data-Type-1 !! Data-Type-2</nowiki><br /><nowiki>
|-</nowiki><br /><nowiki>
| Data-1a || Data-2a</nowiki><br /><nowiki>
|-</nowiki><br /><nowiki>
| Data-1b || Data-2b</nowiki><br /><nowiki>
|}
</nowiki></tt>
|}
For a bottom side, right aligned caption texts:
|+ align="bottom" style="caption-side: bottom; text-align: right;" | Caption at bottom
==See also==
[[Help:Table]]
{{H:f|enname=Table caption}}
'''Caption''' tag is a part of [[m:HTML element#Tables|Table]] (html) tag. It places texts above the table, by default. Texts can also be at below, left or 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%" |
{| border="1"
|+ This is a Caption
! Data-Type-1 !! Data-Type-2
|-
| Data-1a || Data-2a
|-
| Data-1b || Data-2b
|}
|-
| width="20%" | Wiki code:
| colspan="2" | <pre><nowiki>
{| border="1"
|+ This is a Caption
! Data-Type-1 !! Data-Type-2
|-
| Data-1a || Data-2a
|-
| Data-1b || Data-2b
|}
</nowiki></pre>
|-
| width="20%" | Html code:
| colspan="2" | <pre><nowiki>
<table border="1">
<caption> This is a Caption </caption>
<tr>
<th> Data-Type-1 </th><th> Data-Type-2 </th>
</tr><tr>
<td> Data-1a </td><td> Data-2a </td>
</tr><tr>
<td> Data-1b </td><td> Data-2b </td>
</tr>
</table>
</nowiki></pre>
|}
A html '''<caption>''' tag can be created by using following wiki code:
|+ Caption
which generates the following html code:
<caption>Caption</caption>
You can also use parameters in wiki code:
|+ ''params''|Caption
which will generate below html code:
<caption ''params''>Caption</caption>
[[en:Cascading Style Sheets|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 ~[[en:Internet Explorer|IE]] 6).
Equivalent [[en:Cascading Style Sheets|stylesheet]] parameter:
style="caption-side: top|bottom|left|right|inherit;"
{| border="0" width="100%"
| colspan="2" style="vertical-align: middle" | In the rightside table, the texts '''Caption at bottom''' showing a bottom side caption.
|
{| border="1"
|+ align="bottom" style="caption-side: bottom" | Caption at '''bottom'''
! Data-Type-1 !! Data-Type-2
|-
| Data-1a || Data-2a
|-
| Data-1b || Data-2b
|}
|-
| width="10%" | Wiki code:
| colspan="2" style="border: 1px dashed #2f6fab; background-color: #f9f9f9;" | <tt><nowiki>
{| border="1"</nowiki><br /><nowiki>
|+ align="bottom" style="caption-side: bottom" | Caption at '''bottom'''</nowiki><br /><nowiki>
! Data-Type-1 !! Data-Type-2</nowiki><br /><nowiki>
|-</nowiki><br /><nowiki>
| Data-1a || Data-2a</nowiki><br /><nowiki>
|-</nowiki><br /><nowiki>
| Data-1b || Data-2b</nowiki><br /><nowiki>
|}
</nowiki></tt>
|}
For a bottom side, right aligned caption texts:
|+ align="bottom" style="caption-side: bottom; text-align: right;" | Caption at bottom
==See also==
[[Help:Table]]
{{H:f|enname=Table caption}}