7: Images
Images certainly make a web page prettier than plain text. But you have to balance a few things when putting images on your page. As I've mentioned before, some people use text-to-speech browsers. Some people use text-only browsers (like lynx). Some people have really slow modems. Some people turn off automatic image loading. At any rate, you have to make sure that clicking on pretty pictures isn't the only way to get around. A graphical toolbar with a text one right underneath it is a decent workaround to one of these issues.
The IMG tag is also one of the few that does not have a closing tag. Makes sense, because it's an item in itself, and not modifying the text it surrounds like a lot of other tags do. Like the A tag, there are elements required inside the tag. A typical use is as follows:
<IMG src="images/flag.gif" alt="canadian flag">
Which loads:

The src element stands for 'source' - the file containing the image. The alt element stands for 'alternate' - the text the browser displays if it is incapable of using the picture. Always remember the alt element! It is required in HTML 4.01.
HTML Tutorial index
| Beginners Tutorial index
<< Back: Lists
| Next: Tables >>
