Posted by Toby Inkster on 10/13/05 10:21
dorayme wrote:
> Anyone know if there is a simple way or a way to have some
> /styled/ text appear if a graphic image fails (by accident or
> intention) to load?
That's the idea of the <object> element:
<object type="image/jpeg" data="blah.jpeg" height="120" width="180">
<p>Alternative text goes here. It can use <i>italics</i> or
<b>bold</b> or whatever you want. You might want to offer a <a
href="blah.jpeg">link to the image</a> so that people can download
it for viewing in a standalone image viewer if their browser doesn't
support images.</p>
</object>
However, although <object> itself is well-supported in most browsers, many
still have problems correctly dealing with the alternative content.
XHTML 2.0 will be cool in that you won't really need the <img/> element.
Any element can be used to display an image. e.g. instead of:
<h1><img src="banner.jpeg" alt="Heading"/></h1>
you'd use:
<h1 src="banner.jpeg">Heading</h1>
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
[Back to original message]
|