caption

UK[ˈkæpʃn] US[ˈkæpʃən]

n. Subtitle; title, caption, subtitle; third file

vt. Add captions to (pictures, photos, etc.); add titles to (documents, etc.); add subtitles to...

Third person singular: captions Plural: captions Present participle: captioning Past tense: captioned Past Participle: captioned

side

英[saɪd] 美[saɪd]

n. Side; aspect; side; face, side

adj. Side; beside; secondary, sideways; deputy

vi. Support, agree; favor; echo; stand on the side of...

Third person singular: sides Plural: sides Present participle: siding Past tense: sided Past participle: sided

javascript captionSide attribute syntax

Function:Set the position of the table title.

Syntax: Object.style.captionSide=top|bottom|left|right

javascript captionSide attribute example

<html>
<head>
<style type="text/css">
caption
{
caption-side:bottom; 
}
</style>
<script type="text/javascript">
function moveCaption()
{
document.getElementById('myTable').style.captionSide="right"
}
</script>
</head>
<body>

<table border="1" id="myTable">
  <caption>This is a caption</caption>
  <tr>
    <td>100</td>
    <td>200</td>
  </tr>
  <tr>
    <td>300</td>
    <td>400</td>
  </tr>
</table>
<br />
<input type="button" onclick="moveCaption()"
value="Move table caption">

</body>
</html>

Run instance »

Click the "Run instance" button to view the online instance