
How to Position Caption for Tables in CSS
If you ever happen to need to position caption for a table in CSS, there's a rule for that, called caption-side
. No additional rules or markup is needed, just this one:
.bottom {
caption-side: bottom;
}
Copied to clipboard!
By default, this is set to top
. It also accepts the following non-standard values:
.non-standard {
caption-side: left;
caption-side: right;
caption-side: top-outside;
caption-side: bottom-outside;
}
Copied to clipboard!


Looking to improve your skills? Check out our interactive course to master JavaScript from start to finish.

Resources:
π More Webtips
Master the Art of Frontend
Unlimited access to hundred of tutorials
Access to exclusive interactive lessons
Remove ads to learn without distractions