Style captionSide attribute
- Previous Page boxSizing
- Next Page caretColor
- Go to the Previous Level HTML DOM Style Object
Definition and usage
captionSide
Sets or returns the position of the table title.
See also:
CSS Tutorial:CSS Tables
CSS Reference Manual:caption-side attribute
Instance
Example 1
Move the table title to the bottom of the table:
document.getElementById("myCap").style.captionSide = "bottom";
Example 2
Return the table title:
alert(document.getElementById("myCap").style.captionSide);
Syntax
Return the captionSide attribute:
object.style.captionSide
Set the captionSide attribute:
object.style.captionSide = "top|bottom|initial|inherit"
Attribute value
Value | Description |
---|---|
top | Default. Places the table title above the table. |
bottom | Places the table title below the table. |
initial | Sets this property to its default value. See initial. |
inherit | Inherits this property from its parent element. See inherit. |
Technical details
Default value: | top |
---|---|
Return value: | A string indicating the position of the table title. |
CSS Version: | CSS2 |
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | 9.0 | Support | Support | Support |
- Previous Page boxSizing
- Next Page caretColor
- Go to the Previous Level HTML DOM Style Object