Example of HTML table caption Tag - HTML CSS HTML

HTML CSS examples for HTML:Table

Description

Example of HTML table caption Tag

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html lang="en">
 <head> 
  <title>Example of HTML caption Tag</title> 
  <style type="text/css">
    table, td, th {
        border: 1px solid gray;
    }<!--from   w ww.j a v a2 s .  com-->
</style> 
 </head> 
 <body> 
  <table> 
   <caption>
    User Details
   </caption> 
   <thead> 
    <tr> 
     <th>No.</th> 
     <th>Name</th> 
     <th>Email</th> 
    </tr> 
   </thead> 
   <tbody> 
    <tr> 
     <td>1</td> 
     <td>Mary</td> 
     <td>mary@mail.com</td> 
    </tr> 
    <tr> 
     <td>2</td> 
     <td>Tom</td> 
     <td>tom@mail.com</td> 
    </tr> 
    <tr> 
     <td>3</td> 
     <td>Jack</td> 
     <td>jack@mail.com</td> 
    </tr> 
   </tbody> 
  </table>   
 </body>
</html>

Related Tutorials