Incorporating an Image into a Document

At any point in a document, an image may be inserted using the tag <img>. At its simplest, the tag <img> may take the following form.

<img src=image_name>

The most common form of image file format is the GIF file format. The book GIF image (icon) may be incorporated as follows.

<img src=../gif/BookC.gif>

The file BookC.gif is a gif image of a closed book (and BookO.gif is a gif image of an open book). The containing directory for book gifs is ../gif, noting that all gifs are contained in a directory that is a sibling of the directory containing this document (see relative links).

An example of the book icon is right here ==> . As you can see, unless otherwise specified, text flows around an image that is incorporated into a document.

Exercise 11

Exercise 11 builds upon exercise 8. You may wish to refresh your memory about exercise 8 prior to proceeding. The single document book of exercise 8 should be upgraded to look as shown below. Test this example and then proceed to Exercise 11 (Continued).

Table of Contents

BookC.gif Chapter 1
BookC.gif Chapter 2
BookC.gif Chapter 3

BookO.gif Chapter 1

topic.gif Topic1
topic.gif Topic2
topic.gif Topic3

Go To Contents

BookO.gif Chapter 2

topic.gif TopicA
topic.gif TopicB
topic.gif TopicC

Go To Contents

BookO.gif Chapter 3

topic.gif TopicI
topic.gif TopicJ
topic.gif TopicK

Go To Contents

Exercise 11 (continued)

Important Notes

Write a HTML document that satisfies the following criteria:

Take this link to see the solution of the exercise. You should view the source of the solution and compare it to that which you provided. Please note that an additional line has been added to the solution to return you to this point in the discussion. You should add the solution of this exercise to the samples panel that you created in exercise 6.

The next section next.gif discusses the main two formats used to store images.