The <IMG> Tag
![]() |
| <IMG WIDTH=200 SRC="someimage.jpg" HEIGHT="60" WIDTH="249"> |
The IMG tag is used to present graphical images on your pages.
In the example above, the HEIGHT and WIDTH attributes are shown, even though they are not mandatory. Despite the fact they are optional, consider them to be mandatory. If you do not use them, the browser will have to load and size all images before properly displaying your pages.
Options for the IMG tag are:
- ALT="some description" would show the words 'some description' for people with graphics turned off. Also displays the words on some browsers when the mouse passes over the image.
- BORDER=0 causes no border to be placed around an image when it is a link.
- HEIGHT=60 sets the height of the graphic to 60 pixels.
- WIDTH=468 sets the width of the graphic to 468 pixels.
- VSPACE=10 sets a 10 pixel offset between the graphic and the text above and below it.
- HSPACE=10 sets a 10 pixel offset between the graphic and any text to the left and right of it.
- ALIGN=CENTER will center your image on your page, or within a table TD element.
- ALIGN=LEFT places your image on the left side of the page- and allows text to follow down the right side of the image.
- ALIGN=RIGHT places your image on the right side of the page- and allows text to follow down the left side of the image.
For more information on the ALIGN attribute, please see working images into your text.
The <HR> Tag
| <HR WIDTH=300 ALIGN=CENTER> |
The <HR> tag is used to create a horizontal rule, or line on your page. The following attributes can also be used:
- WIDTH="500" would set the width to 500 pixels.
- SIZE="10" would set the height of the line to 10 pixels.
- ALIGN="CENTER" would center the line on the page (horizontally). You can also use LEFT or RIGHT.
- NOSHADE prevents the line from being shadowed.
- COLOR="#FF0000" sets the color to red. (MSIE only)


