Tools, FAQ, Tutorials:
Reducing the Display Size of an Image in HTML
How To Reduce the Display Size of an Image?
✍: FYIcenter.com
If an image embedded inline is too big when displayed in a browser, you can
use "width" and "height" attributes to reduce the image's display size.
The display width and height should be proportional to the actual width and height
of the image. Otherwise, the image will be displayed with a distortion.
Here is a tutorial example of images with reduced sizes:
<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Image Sizes</title>
</head>
<body>
<h4>Inline Images</h4>
<p style="background-color: #eeeeee; padding: 8px;">
Image with the original size:
<img src="/moonrise.jpg" alt="Moonrise"
width="69" height="91"/><br/>
Image with a reduced size:
<img src="/moonrise.jpg" alt="Moonrise"
width="35" height="45"/></p>
</body>
</html>
If you save the above document as image_sizes.html, and view it with Internet Explorer, you will see that the same image is displayed with two sizes as shown below:
⇒ Floating an Image to the Right Side in HTML
⇐ Attributes of an HTML 'img' Element
2017-03-27, ∼2162🔥, 0💬
Popular Posts:
Where to get the detailed description of the JSON.stringify() Function in JavaScript? Here is the de...
How to read RSS validation errors at w3.org? If your RSS feed has errors, the RSS validator at w3.or...
How To Pass Arrays By References? in PHP? Like normal variables, you can pass an array by reference ...
How to use the "rewrite-uri" Policy Statement for an Azure API service operation? The "rewrite-uri" ...
How to how to use matched string and groups in replacements with re.sub()? When calling the re.sub()...