Home Previous TOC Next Bookshelf

7. Images

To place an image in an HTML document, use the <img> tag with the src attribute specifying the address of the image file. Two other attributes are commonly used: alt and title. The alt attribute is used to provide an "alternate text" in case the browser cannot load the image. The value of title will appear when the mouse moves over the image.

The IMG element does not have an end tag. In the standard notation, a slash is added before ">" to close the IMG element, although this is not required. Like a text, the image can also be linked to any file.

In the following demo, the image can be loaded for the online version, but cannot be loaded within the BSON Books Viewer.

Image