Example of Setting Dimensions for Images - HTML CSS HTML

HTML CSS examples for HTML:Image

Description

Example of Setting Dimensions for Images

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html lang="en">
 <head> 
  <meta charset="UTF-8"> 
  <title>Example of Setting Dimensions for Images</title> 
 </head> <!--   w  w w.j a  va  2  s  . c  o m-->
 <body> 
  <div> 
   <img src="http://java2s.com/resources/d.png" alt="an image" width="300" height="300"> 
   <img src="http://java2s.com/resources/h.png" alt="another image" width="250" height="150"> 
   <img src="https://www.java2s.com/style/demo/Opera.png" alt="third image" width="200" height="200"> 
  </div>   
 </body>
</html>

Related Tutorials