Align text underneath image using table - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Text

Description

Align text underneath image using table

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">
.tile_table {<!--  w ww.  j  av  a 2  s  .  com-->
   border-collapse:collapse;
}

.tile_table td {
   text-align:center;
}

.tile_image {
   padding:6px 6px 6px 6px;
   margin:6px 6px 6px 6px;
}
</style> 
 </head> 
 <body> 
  <table class="tile_table"> 
   <tbody> 
    <tr> 
     <td> <img class="tile_image" height="60px" width="60px" src="https://www.java2s.com/style/demo/InternetExplorer.png"> <p class="tile_p">Sound</p> </td> 
     <td> <img class="tile_image" height="60px" width="60px" src="https://www.java2s.com/style/demo/Opera.png"> <p class="tile_p">Sound</p> </td> 
     <td> <img class="tile_image" height="60px" width="60px" src="https://www.java2s.com/style/demo/InternetExplorer.png"> <p class="tile_p">Sound</p> </td> 
     <td> <img class="tile_image" height="60px" width="60px" src="https://www.java2s.com/style/demo/Google-Chrome.png"> <p class="tile_p">Sound</p> </td> 
    </tr> 
   </tbody> 
  </table>  
 </body>
</html>

Related Tutorials