How to create a table with a caption?

HTMLWeb DevelopmentFront End Technology

To create a table with caption in HTML, use the <caption> tag. Caption gets added inside the table, immediately after the <table> tag.

Example

You can try to run the following code to create a table with caption in HTML

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <style>
         table, td, th { border: 1px solid black; }
      </style>
   </head>
   <body>
      <table>
         <caption>Our Technologies</caption>
         <tr>
            <th>IDE</th>
            <th>Database</th>
         </tr>
         <tr>
            <td>NetBeans IDE</td>
            <td>MySQL</td>
         </tr>
      </table>
   </body>
</html>
raja
Published on 01-Feb-2018 07:16:31
Advertisements