Move the table caption to the bottom of the table:
document.getElementById("myCap").style.captionSide = "bottom";
Try it Yourself »
The captionSide property sets or returns the position of the table caption.
Property | |||||
---|---|---|---|---|---|
captionSide | Yes | 9.0 | Yes | Yes | Yes |
Return the captionSide property:
object.style.captionSide
Set the captionSide property:
object.style.captionSide = "top|bottom|initial|inherit"
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 |
Default Value: | top |
---|---|
Return Value: | A String, representing the position of the table caption |
CSS Version | CSS2 |
Return the table caption:
alert(document.getElementById("myCap").style.captionSide);
Try it Yourself »
CSS tutorial: CSS Table
CSS reference: caption-side property
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!