

- 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
Create caption for a table in HTML?
Use the <caption> tag to add a caption to a table. You can try to run the following code to include a table caption in HTML −
Example
Here, we have added a table caption “Indian Cricketers” −
<!DOCTYPE html> <html> <head> <style> table, th, td { border: 1px solid black; } </style> </head> <body> <h2>Cricketers</h2> <table style = "width:100%"> <caption>Indian Cricketers</caption> <th>Name</th> <tr> <td>Sachin Tendulkar</td> </tr> <tr> <td>Virat Kohli</td> </tr> </table> </body> </html>
- Related Questions & Answers
- HTML DOM Table caption Property
- How to create a table with a caption?
- How do we include a table caption in HTML?
- How to create a table caption with JavaScript DOM?
- HTML caption Tag
- Create a table in HTML
- HTML DOM Caption Object
- Controlling the Position of Table Caption using CSS
- Include a caption for a <figure> element in HTML5
- How to create table border in HTML?
- How to create table header in HTML?
- How to create table footer in HTML?
- How to create table heading in HTML?
- In HTML how to create table header?
- Control the placement of the table caption with CSS
Advertisements