Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   HTML (http://www.velocityreviews.com/forums/f31-html.html)
-   -   alt and title in <img> tag? (http://www.velocityreviews.com/forums/t162174-alt-and-title-in-img-tag.html)

Suzanne Knapp 07-04-2005 03:37 PM

alt and title in <img> tag?
 
Is it ok to use both alt and title attributes in an <img> tag (so all
browsers will honor at least one of them)?



Dylan Parry 07-04-2005 03:49 PM

Re: alt and title in <img> tag?
 
Using a pointed stick and pebbles, Suzanne Knapp scraped:
> Is it ok to use both alt and title attributes in an <img> tag (so all
> browsers will honor at least one of them)?


Yes, it is fine. In fact you *should* be using alt attributes for all
your images. With regards support, I don't know of any browsers that
*don't* support the alt attribute, but I think that Netscape 4 didn't
support title attributes.

Internet Explorer will use the alt attribute as a tooltip, which is
wrong, but will use the title attribute in preference if it is present.

--
Dylan Parry
http://electricfreedom.org -- Where the Music Progressively Rocks

Dan 07-04-2005 04:46 PM

Re: alt and title in <img> tag?
 
Suzanne Knapp wrote:
> Is it ok to use both alt and title attributes in an <img> tag (so all
> browsers will honor at least one of them)?


You should use them in accordance with their standards-compliant
purpose; the ALT attribute is required for all images and should
consist of whatever the image ought to be replaced with if not
displayed (e.g., in a text browser), which may sometimes be a null
string (for spacers and purely decorative images). The TITLE attribute
is not required, but can be used for supplemental information where
this is relevant.

--
Dan


Vladdy 07-04-2005 04:59 PM

Re: alt and title in <img> tag?
 
Dan wrote:
> You should use them in accordance with their standards-compliant
> purpose; the ALT attribute is required for all images and should
> consist of whatever the image ought to be replaced with if not
> displayed (e.g., in a text browser), which may sometimes be a null
> string (for spacers and purely decorative images).

Spacers have reason to be in HTML in this day and age.
Purely decorative images belong in CSS as element backgrounds.

--
Vladdy
http://www.klproductions.com

Suzanne Knapp 07-04-2005 10:57 PM

Re: alt and title in <img> tag?
 
Thanks. I didn't realize that IE's display of Alt text was erroneous - I
thought that was what was supposed to happen, and was surprised when FireFox
didn't do it. At the FF site I learned that they would display Title text,
so thought that using both attributes (with the same text) would give me
what I wanted. So far so good with IE 6 and FF, haven't tried any others
yet.

"Dylan Parry" <usenet@dylanparry.com> wrote in message
news:3it45aFmk4emU1@individual.net...
> Using a pointed stick and pebbles, Suzanne Knapp scraped:
>> Is it ok to use both alt and title attributes in an <img> tag (so all
>> browsers will honor at least one of them)?

>
> Yes, it is fine. In fact you *should* be using alt attributes for all your
> images. With regards support, I don't know of any browsers that *don't*
> support the alt attribute, but I think that Netscape 4 didn't support
> title attributes.
>
> Internet Explorer will use the alt attribute as a tooltip, which is wrong,
> but will use the title attribute in preference if it is present.
>
> --
> Dylan Parry
> http://electricfreedom.org -- Where the Music Progressively Rocks




dorayme 07-04-2005 11:43 PM

Re: alt and title in <img> tag?
 
> From: Dylan Parry <usenet@dylanparry.com>
>
> Using a pointed stick and pebbles, Suzanne Knapp scraped:
>> Is it ok to use both alt and title attributes in an <img> tag (so all
>> browsers will honor at least one of them)?

>
> Yes, it is fine. In fact you *should* be using alt attributes for all
> your images. With regards support, I don't know of any browsers that
> *don't* support the alt attribute, but I think that Netscape 4 didn't
> support title attributes.
>
> Internet Explorer will use the alt attribute as a tooltip, which is
> wrong, but will use the title attribute in preference if it is present.
>


I'd say to be careful about titles, they seem to invariably produce pop out
bubbles which are sometimes a distracting nuisance...

(1) Once I was greatly irritated because I was using the mouse to point
things out to someone in a picture, every time the mouse moved the bubble
would pop up. (2) I have had cases of these pop outs obscuring things I
wanted to see. (3) I *wanted* to read the content of the bubbles but they
refused to stay long enough! (Sorry, it sounds like I am hard to please...
but there is a serious point here.)

Surely all browsers "honor" alt tags? So the decision is when to use
"title". I'd say, only if you want the viewer to briefly see some very short
extra info ... in an image not likely to be so great that a viewer might
want to lovingly feel all over it with a mouse...

dorayme


Suzanne Knapp 07-04-2005 11:58 PM

Re: alt and title in <img> tag?
 
The popouts are the effect I was trying for, so Title is fine for that
purpose. They stay on as long as the cursor is over the image, which is
what I want. The only problem is older browsers that don't display title
text, and the Alt text covers those (at least the ones I know about).

Suzanne

"dorayme" <dorayme@optusnet.com.au> wrote in message
news:BEF006CD.14191%dorayme@optusnet.com.au...
>> From: Dylan Parry <usenet@dylanparry.com>
>>
>> Using a pointed stick and pebbles, Suzanne Knapp scraped:
>>> Is it ok to use both alt and title attributes in an <img> tag (so all
>>> browsers will honor at least one of them)?

>>
>> Yes, it is fine. In fact you *should* be using alt attributes for all
>> your images. With regards support, I don't know of any browsers that
>> *don't* support the alt attribute, but I think that Netscape 4 didn't
>> support title attributes.
>>
>> Internet Explorer will use the alt attribute as a tooltip, which is
>> wrong, but will use the title attribute in preference if it is present.
>>

>
> I'd say to be careful about titles, they seem to invariably produce pop
> out
> bubbles which are sometimes a distracting nuisance...
>
> (1) Once I was greatly irritated because I was using the mouse to point
> things out to someone in a picture, every time the mouse moved the bubble
> would pop up. (2) I have had cases of these pop outs obscuring things I
> wanted to see. (3) I *wanted* to read the content of the bubbles but they
> refused to stay long enough! (Sorry, it sounds like I am hard to please...
> but there is a serious point here.)
>
> Surely all browsers "honor" alt tags? So the decision is when to use
> "title". I'd say, only if you want the viewer to briefly see some very
> short
> extra info ... in an image not likely to be so great that a viewer might
> want to lovingly feel all over it with a mouse...
>
> dorayme
>




Mark Parnell 07-05-2005 12:04 AM

Re: alt and title in <img> tag?
 
Previously in alt.html, dorayme <dorayme@optusnet.com.au> said:

> I'd say to be careful about titles, they seem to invariably produce pop out
> bubbles which are sometimes a distracting nuisance...


On IE, alt does the same.

> Surely all browsers "honor" alt tags?


*Attributes*. alt *attributes*. :-)

> So the decision is when to use
> "title".


Use an empty title (title="") to stop IE from displaying the alt
attribute as a tooltip.

--
Mark Parnell
http://www.clarkecomputers.com.au
alt.html FAQ :: http://html-faq.com/

Mark Parnell 07-05-2005 12:08 AM

Re: alt and title in <img> tag?
 
Previously in alt.html, Suzanne Knapp <sc.knapp@verizon.net> said:

> Thanks. I didn't realize that IE's display of Alt text was erroneous - I
> thought that was what was supposed to happen,


A common misconception, thanks to IE's behaviour. :-(

According to the specs -
http://www.w3.org/TR/html4/struct/objects.html#adef-alt - the alt
attribute specifies a textual *alternative* to the image. IOW, it is
supposed to be displayed only if the image *isn't*, for whatever reason.

--
Mark Parnell
http://www.clarkecomputers.com.au
alt.html FAQ :: http://html-faq.com/

Mark Parnell 07-05-2005 12:08 AM

Re: alt and title in <img> tag?
 
Previously in alt.html, Vladdy <vlad@klproductions.com> said:

> Spacers have reason to be in HTML in this day and age.


I think that would be *no* reason?

--
Mark Parnell
http://www.clarkecomputers.com.au
alt.html FAQ :: http://html-faq.com/


All times are GMT. The time now is 02:24 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.