We would like to know how to set image size to resize image.
<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
#image {<!-- www. j a va2s . c om-->
width: 300px;
height: 300px;
border: 1px solid black;
}
</style>
</head>
<body>
<div id='image'>
<img src="http://www.java2s.com/style/download.png" alt="alternative error message"
width="300" height="300">
</div>
</body>
</html>
The code above is rendered as follows: