A good answer might be:


Images in Web Pages

As are all Internet resources, a digital image is a collection of bit patterns stored as a disk file. So the fundamental electronics and comunications is the same for images as for any other resource. To include an image in a web page use the img tag:

<img src="petrock.jpg" />

img is the HTML tag type; src stands for "source" and is followed by the relative pathname to the image or the full URL of the image. For example, the above tag will cause this image to be loaded:

The slash "/" at the end is officially required by XHTML in order to follow the rule that all tags have a closing tag. But instead of two tags <img> and </img> use one combined tag <img />. For compatibility with older browser put a space in front of the slash, although usually this does not matter.

Image files follow particular formats, and use various schemes to compress their data. Only three types of image files can be used in Web pages: "gif" files, "jpg" files, and "png" files. These types of image files are used by most image processing programs. Some high-end commercial programs (like Adobe Photoshop) use specialized formats, but can save a version of the image in one of the above formats.


Is the above image nicely positioned on the page?