Image Resizing
To define the image size, use the width and height attributes.
The value can be specified in
pixels or as a
percentage:
<html>
<head>
<title>first page</title>
</head>
<body>
<img src="tree.jpg" height="150px" width="150px" alt="" />
<!-- or -->
<img src="tree.jpg" height="50%" width="50%" alt="" />
</body>
</html>Try It Yourself
Loading images takes time. Using large images can slow down your page, so use them with care.
Comments
Post a Comment