Display text below css style centered image - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Image Text

Description

Display text below css style centered image

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style>
html, body {
   height:100vh;
   background:Chartreuse;
   color:yellow;
}

.imageContainer {<!--from  w w w . j  a  va  2s.  c o m-->
   display:flex;
   justify-content:center;
   flex-direction:column;
   align-content:center;
   align-items:center;
}

p {
   text-align:center;
}
</style> 
 </head> 
 <body> 
  <div class="imageContainer"> 
   <img src="https://www.java2s.com/style/demo/InternetExplorer.png"> 
   <p> <a href="">Lorem i</a>Lor<a href="/international/">Lorem i</a> </p> 
  </div>  
 </body>
</html>

Related Tutorials