Using "Alt" tag for images

M

MP

I need some recommendations on using "Alt" tags

1. They are not "required" correct"
2. Best practice is to use them though?
3. If you don't have a low-res alternative should you leave it off or can
you link to the same image?

Hope this makes sense!

Thanks!
 
S

Steve Easton

In line:

MP said:
I need some recommendations on using "Alt" tags

1. They are not "required" correct"

Incorrect, they are required to meet W3C standards also for accesability reasons
2. Best practice is to use them though?
Correct

3. If you don't have a low-res alternative should you leave it off or can you link to
the same image?

The alt tag is for text. You enter a short text description of the image, which is what
appears when a mouse moves over the image.

--
Steve Easton
Microsoft FrontPage MVP
FP Cleaner
http://www.95isalive.com/fixes/fpclean.htm
Hit Me FP
http://www.95isalive.com/fixes/HitMeFP.htm
 
M

Murray

3. If you don't have a low-res alternative should you leave it off or can
The alt tag is for text. You enter a short text description of the image,
which is what appears when a mouse moves over the image.

Incorrect.

But first, the low-res alternative is no longer supported, as far as I know.
I never got the idea of making a slow loading image even slower to load by
encumbering the page with the low-res alternative in the first place!

Second, alt ATTRIBUTE is for accessability purposes. Only IE shows the text
when you mouse over it. All modern browsers follow the W3 guidelines for
it - and wait for the title attribute. If you have a title attribute *AND*
an alt attribute, then IE will correctly only display the title attribute's
contents on rollover....
 
S

Steve Easton

Murray said:
Incorrect.

But first, the low-res alternative is no longer supported, as far as I know. I never got
the idea of making a slow loading image even slower to load by encumbering the page with
the low-res alternative in the first place!

Second, alt ATTRIBUTE is for accessability purposes. Only IE shows the text when you
mouse over it. All modern browsers follow the W3 guidelines for it - and wait for the
title attribute. If you have a title attribute *AND* an alt attribute, then IE will
correctly only display the title attribute's contents on rollover....

Correct
However, if the alt tag is missing the page won't validate.
Also, in EWD and SP-D if the alt tag is missing or blank, it will fail on the
compatibility check.

;-)

--
Steve Easton
Microsoft FrontPage MVP
FP Cleaner
http://www.95isalive.com/fixes/fpclean.htm
Hit Me FP
http://www.95isalive.com/fixes/HitMeFP.htm
 
M

Mike Mueller

MP asked:
I need some recommendations on using "Alt" tags
1. They are not "required" correct"
2. Best practice is to use them though?
************************************

Steve replied:
The alt tag is for text. You enter a short text description
of the image, which is what
appears when a mouse moves over the image.
************************************

Murray corrected Steve:
Incorrect-
alt ATTRIBUTE is for accessability purposes. Only IE shows
the text when you
mouse over it. All modern browsers follow the W3 guidelines
for it - and wait for the
title attribute. If you have a title attribute *AND* an
alt attribute, then IE will
correctly only display the title attribute's contents on
rollover....
*************************************

Steve replied:
Correct
However, if the alt tag is missing the page won't validate.
Also, in EWD and SP-D if the alt tag is missing or blank, it
will fail on the
compatibility check.

*************************************
*************************************

My turn.....
The ALT attribute is not required for a webpage to work. It
is required for it to pass
any type of validation though, as the standards for web
developement call for it.
This is due to accessibilty purposes- many people do not
have images shown for
various reasons, and the visual impaired people cannot see
them. This is where the
ALT attribute comes in. It is used as a placeholder for the
images when not displayed
or when the image is still downloading. TTS engines (screen
readers) also will read the
ALT information to the visually impaired.
MS programmed into IE the ability for the ALT information to
work as a tool tip if
there is no TITLE attribute present.

Sample:
<img src="Image_URL" alt="placeholder or text variant"
title="Tooltip aka Popup information">

The w3c standards really don't care about the ALT content,
and will validate alt="".
The accessibility standards (eg Sec508) which specifically
are looking for the ALT
information want a minimum length of 7 characters and a
maximum length of 81.
They should also be unique on the page.

Added benefits of using the Alt & Title attrbutes is Search
Engine Optimization. The
search engines will index the information from the
attributes also.
 
M

Murray

Definitely. alt ATTRIBUTES (not tags) are required for all images. Note, I
didn't say otherwise.

And EWD does a BANG up job with things like this....
 
P

P@tty Ayers

MP said:
I need some recommendations on using "Alt" tags

1. They are not "required" correct"

They're not required for your page to function. They may be required by your
boss or client, if the web site needs to meet W3C specifications or WAI
guidelines.
2. Best practice is to use them though?

Yes. They're important to people with disabilities and users with text-only
browsers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top