Alignment of images with caption - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Image Align

Description

Alignment of images with 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">
.images {<!--   www.jav  a  2s. c  om-->
   float:left;
   width:301px;
   min-height:201px;
   margin:0 11px 0 0;
   background-color:Chartreuse;
}

.images:last-child {
   
}
.images figcaption {
   text-align:center;
}
</style> 
 </head> 
 <body> 
  <figure class="images"> 
   <img src="https://www.java2s.com/style/demo/InternetExplorer.png" width="300" height="199" alt="City"> 
   <figcaption>
     City 
   </figcaption> 
  </figure> 
  <figure class="images"> 
   <img src="https://www.java2s.com/style/demo/Opera.png" width="300" height="199" alt="Model"> 
   <figcaption>
     Model 
   </figcaption> 
  </figure> 
  <figure class="images"> 
   <img src="https://www.java2s.com/style/demo/Google-Chrome.png" width="300" height="199" alt="Foo"> 
   <figcaption>
     Foo 
   </figcaption> 
  </figure>  
 </body>
</html>

Related Tutorials