HTML and CSS Reference
isn't allowed to have any descen-
dants. The only widely sup-
ported possibility of providing
fallback content should the
image be unavailable is the alt
attribute. If the image doesn't
load or isn't in a format sup-
ported by the browser, then the
user sees the alternative text.
This isn't something you're
likely to have noticed unless you
tried viewing the previous exam-
ple in IE8 , in which case you saw
something like the image at right.
Many people have long consid-
ered this a failing of the <img>
element. Images appeared in the HTML spec because the most popular
browser had support for them, and with the current syntax. Of course,
it was the most popular browser because, in part, it was the first one
that allowed the viewing of images without launching a separate appli-
cation. Several features common to the early alternative proposals to
the <img> element have ended up as features in the <object> element, a
general-purpose element for embedding content in your page.
The <object> element can link to an arbi-
trary file. The only additional require-
ment is that you specify the file type:
An image of Dust Puppy
In browsers that support SVG images, the
visible result is no different than including
the image with the <img> element.