You are here: Re: styled text substitute for a picture that fails to load... « HTML « IT news, forums, messages
Re: styled text substitute for a picture that fails to load...

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация