put text on an image - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Image Text

Description

put text on an image

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">
.social_media_head {
   position:relative;
   display:block;
}

.social_media_head div {
   position:absolute;
   left:21px;
   top:17px;
   color:Chartreuse;
   font-size:27px;
   font-weight:bold;
   font-family:sans-serif;
}
</style> <!-- www. j  a v a 2s.c  o  m-->
 </head> 
 <body> 
  <div class="social_media_head"> 
   <img src="https://www.java2s.com/style/demo/Safari.png" alt=""> 
   <img src="https://www.java2s.com/style/demo/Firefox.png" alt=""> 
   <img src="https://www.java2s.com/style/demo/Opera.png" alt=""> 
   <div>
     Lorem ipsum do 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials