

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Control the placement of the table caption with CSS
The CSS caption-side property is used to control the placement of the table caption.
Example
You can try to run the following code to implement caption-side property:
<html> <head> <style> caption.top { caption-side:top } caption.bottom { caption-side:bottom } </style> </head> <body> <table style = "width:500px; border:3px solid gray;"> <caption class = "top"> Countries (Top Caption) </caption> <tr><td> India</td></tr> <tr><td> UK</td></tr> <tr><td> US</td></tr> <tr><td> Australia</td></tr> </table> <br /> <table style = "width:500px; border:3px solid blue;"> <caption class = "bottom"> Countries (Bottom caption) </caption> <tr><td> India</td></tr> <tr><td> UK</td></tr> <tr><td> US</td></tr> <tr><td> Australia</td></tr> </table> <br /> </body> </html>
- Related Questions & Answers
- Controlling the Position of Table Caption using CSS
- How to set the position of the table caption in JavaScript?
- Control the flow and formatting of text with CSS
- Usage of CSS caption-side property
- How to control the shape or appearance of the marker with CSS?
- How to create a table with a caption?
- HTML DOM Table caption Property
- How to create a table caption with JavaScript DOM?
- Create caption for a table in HTML?
- How do we include a table caption in HTML?
- What is the use of "placement new" in C++?
- What is Private Placement of Shares?
- Set the color of the border with CSS
- Set the width of the outline with CSS
- Set the color of the outline with CSS
Advertisements