E-mail List Archives

Re: question about Div tags and content images

for

From: Michael Moore
Date: Jan 27, 2005 3:11PM


skeegan wrote:

>
> Two questions:
>
> 1. Is there a way to place an alternative text attribute to communicate
> information to screen-readers?

Well yes and no. You can place a clear gif over the background image
that is being loaded through the and give that the alt. This is
more of a hack to get around a problem that should not have been created
in the first place.
>
> 2. Is this just an improper use of the DIV tag and should developers be
> made aware that this image and content should be placed using the IMG tag?

Yes, you have hit the nail on the head. CSS and the element are
being used improperly in the above example. The proper way to have
placed the image would have been. <img ... alt="description of
image" ... /> If as you describe the image is just text then the
best method would be <p class="foo"
>Text Feel free to substitute your own structurally
appropriate text presentation elements. class and id are optional
attributes in the above example.

Mike