Aligning image to H1 tag lines - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Image Align

Description

Aligning image to H1 tag lines

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">
h1 {<!--from   ww  w .j av a 2 s .c o  m-->
   display:flex;
   align-items:center;
}
</style> 
 </head> 
 <body> 
  <h1> <img src="https://www.java2s.com/style/demo/Safari.png" height="35" style="padding-right:20px; vertical-align: middle;"> <span>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s</span> </h1>  
 </body>
</html>

Related Tutorials