Images and image zones

Documents that consist entirely of text tend to be quite dull. Images add interest, and in some cases are truly 'worth a thousand words'.

Image references

The Image (Img) element identifies an image file, the content of which is to appear at the current location. This is an empty element. The Source (Src) attribute specifies the name and location of the image file using a URL reference (see Chapter 30):

...there is a GIF file <img src="myimage.gif" /> here.

This element takes additional attributes to specify the Width and Height of the image. By telling the browser the dimensions of the image, it can speed up presentation of the document because the rest of the page can be built before the image is downloaded:

 <img ... ...

Get XML Companion, The, Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.