Create caption for a table in HTML?

HTMLWeb DevelopmentFront End Technology

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 −


Here, we have added a table caption “Indian Cricketers” −

<!DOCTYPE html>
         table, th, td {
         border: 1px solid black;
      <table style = "width:100%">
         <caption>Indian Cricketers</caption>
            <td>Sachin Tendulkar</td>
            <td>Virat Kohli</td>
Published on 14-Mar-2018 05:40:30