2.5: Adding images to your page

The Earth as seen from deep space (NASA photo)

The Earth as seen from deep space in a JPG file. (NASA photo)

The visual world of the web

The World Wide Web is a visual place. Most of the pages in this chapter have been heavy on text with few pictures. To open this page and see a beautiful picture of earth is refreshing to the eye, and it demonstrates the spectacular use we can make of images.

In future chapters we will discuss in depth how to create images and when to use the various image formats. For now, we’ll concentrate on how to place a photo on your page.

Be sure to review the information in the sidebar on image formats.

The image tag

Here is the image tag for the Earth photo:


<img src="images/earth.jpg" alt="The Earth as seen from deep space (NASA photo)" 
title="The Earth as seen from deep space (NASA photo)" width="450" height="450" />

Let’s break it down:

File sizes

Some helpful tips