Drawing a box around a table and its associated caption - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Caption

Description

Drawing a box around a table and its associated caption

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
caption {<!--   w  w w.j a v a2 s .  com-->
   border-left:5px solid Chartreuse;
   border-right:5px solid yellow;
   border-top:5px solid blue;
}

table {
   border-left:5px solid pink;
   border-right:5px solid OrangeRed;
   border-bottom:5px solid grey;
}
</style> 
 </head> 
 <body> 
  <table> 
   <caption>
     Lorem ipsum dol 
   </caption> 
   <thead> 
    <tr> 
     <td>Lorem</td> 
     <td>Lore</td> 
    </tr> 
   </thead> 
   <tbody> 
    <tr> 
     <td>L</td> 
     <td>L</td> 
    </tr> 
   </tbody> 
  </table>  
 </body>
</html>

Related Tutorials