Align image with text - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Image Text Alignment

Description

Align image with text

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">
#content img {<!--  w  w  w . j av a2  s. c o m-->
   border:3px solid Chartreuse;
   vertical-align:middle;
   width:121px;
   height:121px;
   float:left;
}
</style> 
 </head> 
 <body> 
  <div id="content"> 
   <h1> <b>Lorem ipsum do</b> </h1> 
   <img src="https://www.java2s.com/style/demo/InternetExplorer.png"> 
   <span style="">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed fermentum. Aliquam erat volutpat. Vestibulum torto</span> 
  </div>  
 </body>
</html>

Related Tutorials