10.3. Set Image Width and Height
You can set the width and height of an image to suit your needs by using the width and height attributes. You can specify the image's width and height in pixels or as a percentage (%) of its original size.
10.4. Bordered Image
You can add a border around an image and set its thickness in pixels by using the border attribute. A thickness of 0 means there is no border around the image.
Source Code:
<!DOCTYPE html>
<html>
<head>
<title>Image Size and Border Example</title>
</head>
<body>
<!-- Image with width, height, and border -->
<img src="photo/photo55.jpg" width="300" height="200" border="5" alt="Sample Image">
<br><br>
<!-- Image with percentage size and no border -->
<img src="photo/photo55.jpg" width="50%" height="50%" border="0" alt="No Border Image">
</body>
</html>Result:
Watch the video:


