How to define a table caption using HTML ? Last Updated : 20 Dec, 2023 Comments Improve Suggest changes Like Article Like Report In this article, we define a table caption by using the <caption> tag element. The caption element is used to specify the caption of a table. This tag will be inserted just after the table tag. Only one caption can be specified for one table. It is by default aligned to the center. Syntax: <caption align="value"> </caption> Example: html <!DOCTYPE html> <html> <head> <style> table, th, td { border: 1px solid black; } #GFG { font-size: 25px; color: green; } </style> </head> <body> <h1 style="color:green;font-size:35px;"> GeeksForGeeks </h1> <h2> HTML5: How to define a table caption? </h2> <table> <!-- Adding caption to the table --> <caption id="GFG">Students</caption> <tr> <th>Firstname</th> <th>Lastname</th> <th>Age</th> </tr> <tr> <td>Priya</td> <td>Sharma</td> <td>24</td> </tr> <tr> <td>Arun</td> <td>Singh</td> <td>32</td> </tr> <tr> <td>Sam</td> <td>Watson</td> <td>41</td> </tr> </table> </body> </html> Output: Supported Browsers are listed below: Google Chrome Internet Explorer Firefox Opera Safari Comment More infoAdvertise with us Next Article How to define a table caption using HTML ? M manaschhabra2 Follow Improve Article Tags : Web Technologies HTML HTML-Questions Similar Reads How to create a table row using HTML? Define a row in a table by using a <tr> tag in a document. This tag is used to define a row in an HTML table. The tr element contains multiple th or td elements. Syntax:<tr> ... </tr>Example: In this example, a table row in HTML5, utilizes the <tr> tag within the <tbody 1 min read How to Set Caption for an Image using HTML? A caption for an image is a short description for a title that explains the image, providing context or additional information. In HTML, add a caption to an image by using the <figure> tag for the image and the <figcaption> tag below it for the caption text.Syntax<figcaption> Figur 1 min read How to create table cell using HTML5 ? In this article, we will create cell in a table by using a combination of <tr> and <td> tag in a HTML table. Syntax: <table> <tr> <td> . . . </td> <td> . . . </td> </tr> </table> Example: html <!DOCTYPE html> <html> <head> 1 min read How to Create Header Cell in a Table using HTML? A header cell in a table made with <th> tag is used to label columns or rows, helping organize information. To create a header cell in an HTML table, use the <th> element. Header cells typically contain titles for each column or row, and they are bold by default.Syntax<th> Contents 1 min read How to group header content of a table using HTML5 ? In this article, we define to group the header content in a table by using the <th> tag in HTML to set the header cell of a table. Two types of cells in an HTML table. Header Cell: It is used to hold the header information. Standard Cell: It is used to hold the body of data. The working of bot 1 min read Like