Help:Table caption

From Eugene Neighbors

(Redirected from Help:Table Caption)
Jump to: navigation, search
{{#if: Help|
MediaWiki Handbook: Contents, Readers, Editors, Moderators, System admins Template:Edi

{{#if:|Other languages:}} Template:H-langs:

{{#if: Help||}}|
MediaWiki Handbook: Contents, Readers, Editors, Moderators, System admins Template:Edi

{{#if:|Other languages:}} Template:H-langs: {{#if: Help||}}}} 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.

In the rightside table, the texts This is a Caption showing a caption.
This is a Caption
Data-Type-1 Data-Type-2
Data-1a Data-2a
Data-1b Data-2b
Wiki code:
{| border="1"
|+ This is a Caption
! Data-Type-1 !! Data-Type-2
|-
| Data-1a || Data-2a
|-
| Data-1b || Data-2b
|}
Html code:
<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>

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>

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;"
 
In the rightside table, the texts Caption at bottom showing a bottom side caption.
Caption at bottom
Data-Type-1 Data-Type-2
Data-1a Data-2a
Data-1b Data-2b
Wiki code:  {| 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
|}

For a bottom side, right aligned caption texts:

|+ align="bottom" style="caption-side: bottom; text-align: right;" | Caption at bottom

[edit] See also

Help:Table

{{#if: Help|{{#if: Help|Template:Ph:Table caption}}

[edit] Links to other help pages

Help contents (all help pages)
Meta | Wikinews | Wikipedia | Wikiquote | Wiktionary | commons: | mw: | b: | s:
Versions of this help page (for other languages see below)
Meta | Wikinews | {{#if:|{{#if:Wikipedia|Wikipedia|w:Help:Table_caption#}}|{{#if:Wikipedia|Wikipedia|w:Help:Table_caption}}}}http://en.wikipedia.org{{#if:|/wiki/Help:Table_caption#|/wiki/Help:Table_caption}} | Wikiquote | Wiktionary
Links to this page from Meta (int) Meta (ext) Wikipedia MediaWiki
Reading
Go | Search | Stop words | URL | Namespace | Page name | Section
Backlinks | Link | Piped link | Interwiki link | Redirect | Category | Image page
Logging in and preferences
Logging in | Preferences | User style
Editing
Advanced editing | Editing FAQ | Editing toolbar | Export | Import
Editing tips and tricks | Editing shortcuts
Tracking changes
Recent changes (enhanced) | Related changes | Watching pages | Diff
Page history | Edit summary | User contributions | Minor edit | Patrolled edit
Style & formatting
Wikitext examples | Wikitext reference | Reference card
HTML in wikitext | HTML elements
List | Table | Sorting
Special input and output
Inputbox | Special characters | Displaying a formula | Images and other uploaded files | EasyTimeline
Advanced functioning
Template | Advanced templates | Parser function | ParserFunctions | Parameter default | Variable | Magic word | System message | Substitution
Array | Calculation
Page management
Starting a new page | Renaming (moving) a page | Maintenance | Merging and moving pages | Protecting pages
Resolving disputes | Deleting a page
Special pages
Talk page | Testing | Sandbox
Lists of resources
Lists of Categories | Copyrights | Infobox
Redirect | Reference Desk | Shortcuts | Stub types

Other languages: Template:H-langs:Table caption |{{#if: Help|Template:Ph:Table caption}}

[edit] Links to other help pages

Help contents (all help pages)
Meta | Wikinews | Wikipedia | Wikiquote | Wiktionary | commons: | mw: | b: | s:
Versions of this help page (for other languages see below)
Meta | Wikinews | {{#if:|{{#if:Wikipedia|Wikipedia|w:Help:Table_caption#}}|{{#if:Wikipedia|Wikipedia|w:Help:Table_caption}}}}http://en.wikipedia.org{{#if:|/wiki/Help:Table_caption#|/wiki/Help:Table_caption}} | Wikiquote | Wiktionary
Links to this page from Meta (int) Meta (ext) Wikipedia MediaWiki
Reading
Go | Search | Stop words | URL | Namespace | Page name | Section
Backlinks | Link | Piped link | Interwiki link | Redirect | Category | Image page
Logging in and preferences
Logging in | Preferences | User style
Editing
Advanced editing | Editing FAQ | Editing toolbar | Export | Import
Editing tips and tricks | Editing shortcuts
Tracking changes
Recent changes (enhanced) | Related changes | Watching pages | Diff
Page history | Edit summary | User contributions | Minor edit | Patrolled edit
Style & formatting
Wikitext examples | Wikitext reference | Reference card
HTML in wikitext | HTML elements
List | Table | Sorting
Special input and output
Inputbox | Special characters | Displaying a formula | Images and other uploaded files | EasyTimeline
Advanced functioning
Template | Advanced templates | Parser function | ParserFunctions | Parameter default | Variable | Magic word | System message | Substitution
Array | Calculation
Page management
Starting a new page | Renaming (moving) a page | Maintenance | Merging and moving pages | Protecting pages
Resolving disputes | Deleting a page
Special pages
Talk page | Testing | Sandbox
Lists of resources
Lists of Categories | Copyrights | Infobox
Redirect | Reference Desk | Shortcuts | Stub types

Other languages: Template:H-langs:Table caption }}

Personal tools