Writing HTML | Return to Lesson 7a |

Testing HTML for Lesson 7a: From Small to Big

This page demonstrates the use of the height and width attributes of the <img...> tag to resize an image. The original image is only 211 bytes in file size. In the lower HTML example its dimensions are both increased by a factor of 10. The advantage here is that you can make an image fill a large area of a page without making a large file. (Thanks to Douglas Nagy for pointing this out!)
Original
49 pixels wide and 25 pixels high, 0.2k file size
This HTML:
   <img src="../pictures/new.gif" alt="new!" width="49" height="25">
produces this image:

sample web page
new!



10 times larger
490 pixels wide and 250 pixels high, 0.2k file size
This HTML:
   <img src="../pictures/new.gif" alt="new!" width="490" height="250">
produces this image:

sample web page
new!




Writing HTML: Testing HTML for Lesson 7a
©1994-2002 Maricopa Center for Learning and Instruction (MCLI)
Maricopa Community Colleges

The Internet Connection at MCLI is Alan Levine --}
Questions? Comments? Visit our feedback center

URL: http://www.mcli.dist.maricopa.edu/tut/tut7a_ex/test1.html