Glubase - share your knowledge


All / Computers / Programming / CSS





  • View Command

CSS Reference

CSS caption-side definition

Syntax

caption-side: <value>;

Description

This property defines the position of the table caption.

Values

Values Description
top Positions the caption above of the table.
bottom Positions the caption below the table.
left Positions the caption to the left of the table.
right Positions the caption to the right of the table.

Version information

Available in CSS2

Example

[Try this example yourself]


<table style="caption-side: right;">
  <caption>Caption</caption>
  <tr>
    <td>First</td>
    <td>Second</td>
  </tr>
  <tr>
    <td>Third</td>
    <td>Fourth</td>
  </tr>
</table>

<br />

<table style="caption-side: bottom;">
  <caption>Caption</caption>
  <tr>
    <td>First</td>
    <td>Second</td>
  </tr>
  <tr>
    <td>Third</td>
    <td>Fourth</td>
  </tr>
</table>

Output

Caption
First Second
Third Fourth

Caption
First Second
Third Fourth
  • Comments

No comments added.