captionSide Property - Javascript CSS Style Property

Javascript examples for CSS Style Property:captionSide


The captionSide property sets or gets the position of the table caption.

Property Values

Value Description
top Default. Place the table caption above the table
bottom Place the table caption below the table
initial Sets this property to its default value.
inherit Inherits this property from its parent element.

Technical Details

Item Value
Default Value: top
Return Value: A String, representing the position of the table caption
CSS VersionCSS2

Get the table caption of the table:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
table, th, td {
    border: 1px solid black;
    margin: 10px;
</style>/*from w  w w  . j  a  v a2s.  c  o m*/

<button onclick="myFunction()">Test</button>

  <caption id="myCap" style="caption-side:bottom;">Table 1.1 Customers</caption>

function myFunction() {


Related Tutorials