Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

2. Going Further, with Hypertext: Meetin... > Fixing those broken images...

Fixing those broken images...

You’ve almost got the lounge back in working order; all you need to do now is fix those images that aren’t displaying.

We haven’t looked at the <img> element in detail yet (we will in a couple of chapters), but all you need to know for now is that the <img> element’s src attribute takes a relative path, just like the href attribute.

Here’s the image element from the “lounge.html” file:

image with no caption
image with no caption

Finding the path from “lounge.html” to “drinks.gif”

To find the path, we need to go from the “lounge.html” file to where the images are located, in the “images” folder.

image with no caption

So putting (1) and (2) together our path looks like “images/drinks.gif”, or:

<img src="images/drinks.gif">

Finding the path from “elixir.html” to “red.jpg”


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial