<img src="ImageName.gif" height="" width="" alt="Image Description" />

PURPOSE: To place a graphic image on the page. The most commonly used graphics have a .gif or .jpeg extension. Always include the height and width of the graphic. The alt attribute is used to show a description of the graphic if it fails to load and used by page reader software for the visually impaired. The image can be aligned left,right or center of the page. You can also use CSS commands to absolutely position the image on the page.
WARNING - lots of graphics can take huge amounts of memory and can severely slow down a page loading in the browser. Use them wisely.

This is one of those tags that is different. There is NOT a </img> tag. It is all incorporated into the one tag. Note there is a space after the end of the alt text and the /.

Below is a basic html document. The referenced html tag is in RED. All tags must have a start and a end tag. Most end tags have a / before the tags name, however there are a few that are done differently. The tags that end differently will be noted and highlighted. The order of the start and end tags is also very important to proper display of your page in a web browser.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title> The Page Title Goes Here </title>
</head>
<body>
<p>
<img src="theimagename.jpeg" align="center" height="25" width="100" alt="description of the image" />
</p>
</body>
</html>


© Copyright 2001,2002 Southern Twilight    All rights reserved.

Back To HTML Examples