Align text and image side by side - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Image Text Alignment

Description

Align text and image side by side

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">
img {<!-- ww  w. j a  va  2  s  .co  m-->
   float:left;
   margin-right:6px;
}

h3 {
   line-height:21px;
}
</style> 
 </head> 
 <body> 
  <article> 
   <img src="https://www.java2s.com/style/demo/Opera.png"> 
   <h3>Long title should go right here</h3> 
  </article>  
 </body>
</html>

Related Tutorials