|
The image tag BY WIL GERKEN
The image tag has many arguments and is also a rule breaker by being a single tag rather then a paired set. In its most simplistic form, the image tag contains a single argument "src" which is the name of the image file. For example, if you wanted to display an image called "logo.gif", you would code the following: <img src="logo.gif"> Here is a list of the other common arguments used in image tags:
Note: the order of arguments is never important.
<img src="logo.gif" width="50" height="58" alt="Weekly Wire"> This would allow the browser to set aside the space an image will take up. By doing this, the page will lay out faster and the text will be displayed much sooner. I always recommend using the width and height tag on EVERY image you code. The "alt" tag is used for backwards compatibility with text only browsers that can't display images. In this scenario, the user would see "Weekly Wire" and know what the image was. If you do not use an "alt" tag, the user would see the word "image" and not know what it was. I always recommend using the "alt" tag.
<img src="logo.gif" width="50" height="58" alt="Weekly Wire" align="right"> or
For example: <img src="logo.gif" width="50" height="58" alt="Weekly Wire" align="right" hspace="5" vspace="5"> This would add 5 pixels of headroom all around the image getting it further from the text You can not center an image within text without working with tables. However, you may center an image above or below text by using the following code:
<div align="center">
|
Home .
About .
Syllabus .
Design Guide .
Message Board
©1997-98 Wil Gerken