X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR BOOTSTRAP XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

Style captionSide Property

Style Object Reference Style Object

Example

Move the table caption to the bottom of the table:

document.getElementById("myCap").style.captionSide = "bottom";

Try it yourself »


Definition and Usage

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


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The captionSide property is supported in all major browsers.

Note: The captionSide property is not supported in IE7 and earlier. IE8 requires a !DOCTYPE. IE9 supports it.


Syntax

Return the captionSide property:

object.style.captionSide

Set the captionSide property:

object.style.captionSide="top|bottom|initial|inherit"

Property Values

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

Technical Details

Default Value: top
Return Value: A String, representing the position of the table caption
CSS Version CSS2


More Examples

Example

Return the table caption:

alert(document.getElementById("myCap").style.captionSide);

Try it yourself »


Related Pages

CSS tutorial: CSS Table

CSS reference: caption-side property


Style Object Reference Style Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook