Image width and height attribute

By default the image is displayed with the original size on the browser. To scale an image to a different width and height, the width and height attribute of the <img> element is used.

* Positive integers (in pixels)
* Percentages (percentage of the parent block)

snippet
<html>
<head></head>
<body>
No Border
<img src="logo.jpg" width="200">
Image with border
<img src="logo.jpg" width="300" height="200">
</body>
</html>

Output
No BorderImage with border


Notes
If the width and height is changed from the original proportions, the image will be rendered disproportionately an will be distorted.
Related Tutorial
1 Images
Follow Us
https://www.facebook.com/Rookie-Nerd-638990322793530 # # # # #