O'Reilly logo

XML Companion, The, Third Edition by Neil Bradley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ... ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required