Images

You can add pictures to a web page using the image element:

<img src="path to image" alt="Alternate text">

The src attribute specifies the path to the image. As discussed in the Absolute and Relative Paths page, this can either be the full path to the image, or just part of the path relative to the current web page.

The alt attribute specifies alternate text that should be displayed if the image can't be dispayed for some reason, or if images are disabled. Confusingly, some browsers, including Internet Explorer, also display the alt text when the mouse is moved over the image, although that isn't the intended purpose of the attribute.

Where to Find Free Images

If you're looking for places to find free images and icons for your website, there are a number of links on the Images and Icons page in our Web Design section.

<-- Previous Page

Nested Lists

Next Page -->

Image Width and Height