http://www.onemathematicalcat.org/day_14_resizing_images.htm
INDEX CARD #14:
RESIZING IMAGES (14a)<IMG> tag
indicate the dimension of the image, in pixels.
By specifying image width and height, the browser can "leave space" for the image as it lays out the page; the graphic is put in place when it arrives. (You can get the "natural" width and height of an image from any graphics editor; try something like "image properties.") Without width and height values, the page must be re-displayed when the graphics finally arrive. If the width and height attributes differ from the actual image dimensions, the browser will resize the graphic. Image quality may not be very good; better to resize images in a graphics program. <IMG SRC="tigger.gif">
width×height = 64×50 <IMG SRC="tigger.gif" WIDTH=128 HEIGHT=50>
|
Using an "EMPTY" Image for Spacing (14b)VIEW the source code for this page to see that (almost) "invisible space" in the amounts of 20, 15, 10, and 5 pixels has been inserted between the following horizontal rules: This word and this word have 25 pixels of (almost) "invisible space" inserted between them. NOTE: If the image is the same color as the background, or if it is transparent, then it won't show. Here, I wanted you to see the (almost) "invisible space." |
Printable version of Index Card 14a
Printable version of Index Card 14b
WORKSHEET #14:
ASSIGNMENT #14: