HTML, our only lecture <-
IAD Lectures
<-
Sean Forman <-
You Are Here
Next: Table Tags /
Previous: Linking tags
/
Up: HTML, our only lecture
- <IMG> - The way to introduce images into text. I'll
list the attributes below.
- SRC - the location of the image either relative to the
current document or from somewhere else.
- HEIGHT & WIDTH - The height and width of the image in
pixels. Most browsers will display this for you when you right-click
and display image. sju.edu
- You should always include the HEIGHT and WIDTH attributes. If
you don't the browser will not know how big to draw the image until it
is able to download all of it. If you have 20 images. All 20 will
have to download before the page properly renders. If you give the
HEIGHT and WIDTH, the browser will set aside the proper amount of
space to render the image and the user may be able to start reading
prior to everything loading.
- If you need to shrink or re-size an image, it is best to do so
in a photoshop-type program than to ask the browser to do it.
- BORDER - this attributes draws a border around the
image when it is within an <A HREF> tag. Usually this should
be set to zero.
- ALIGN, VSPACE and HSPACE - are used to control the
placement of text around the image.
- ALT - This displays text when the mouse is placed over
the image. It also renders in browsers that do not render images.
- USEMAP - This is used to make a single image link to
multiple documents, as with the
amazon.com
image.
- We talked about the types of images and when to use them last
time.
Next: Table Tags /
Previous: Linking tags
Copyright© 2003, Saint Joseph's University and Sean Forman