alt vs title in explorer 7 & firefox


G

GreatArtist

I have internet explorer 7 and firefox 2.
I set my web page to be XHTML 1.0 transitional.
I put the alt attribute in my image tags but they were only displayed
in firefox, not IE7.
So I changed all the alt attributes to title instead. That works in
both IE7 and Firefox.
But now when I use the W3C xhtml validator, it tells me I should have
alt for all the image tags.
Should I include both title and alt in each image tag?
Why doesn't alt work in IE7? Didn't alt work in previous versions of
IE?
 
Ad

Advertisements

J

J.O. Aho

GreatArtist said:
I have internet explorer 7 and firefox 2.
I set my web page to be XHTML 1.0 transitional.
I put the alt attribute in my image tags but they were only displayed
in firefox, not IE7.
So I changed all the alt attributes to title instead. That works in
both IE7 and Firefox.
But now when I use the W3C xhtml validator, it tells me I should have
alt for all the image tags.
Should I include both title and alt in each image tag?
Why doesn't alt work in IE7? Didn't alt work in previous versions of
IE?

Yes, you should have both.
As far as I can recall, the alt is meant to be displayed when the image is
missing, while the title is shown when you hover with the mouse pointer over
the image.

Alt has worked as title in earlier versions of MSIE, there can be two reasons
why alt don't generate a "pop-up", the most likely is that MS has a bug in the
code (which is quite common), or they wanted to follow the standard more closely.
 
D

dorayme

"J.O. Aho said:
Yes, you should have both.
As far as I can recall, the alt is meant to be displayed when the image is
missing, while the title is shown when you hover with the mouse pointer over
the image.

Alt has worked as title in earlier versions of MSIE, there can be two reasons
why alt don't generate a "pop-up", the most likely is that MS has a bug in
the
code (which is quite common), or they wanted to follow the standard more
closely.

I don't think you _should_ have both. You should have the alt.
You may have the title if you want the tool-tip. But you are
perfectly entitled not to want this.

In Witness, John Book asks what is wrong with buttons when trying
on a suit that Rachel has modified for his size. He asks if there
is something wrong with buttons, there being no buttons. The
reply is that no buttons is plain and good. In fact, Amish
authors are forbidden by their church to have title attributes.
 
J

Jukka K. Korpela

Scripsit GreatArtist:
I set my web page to be XHTML 1.0 transitional.

Thanks for the bogosity alert. (You didn't read the group much before
posting. It is frequently explained in this group why XHTML is almost always
useless as the delivery format of web pages and why using the transitional
version is even more pointless.)
I put the alt attribute in my image tags but they were only displayed
in firefox, not IE7.

You don't know what the alt attribute means. Read a book on HTML, or at
least a primer. Then perhaps the great monography on alt attributes:
http://www.cs.tut.fi/~jkorpela/html/alt.html
So I changed all the alt attributes to title instead. That works in
both IE7 and Firefox.

No, it's just your illusion.
But now when I use the W3C xhtml validator, it tells me I should have
alt for all the image tags.

Of course. Except that it says "shall", not "should".
Should I include both title and alt in each image tag?

You should stop working on web pages before you understand the basics,
including the alt attribute.
 
J

John Hosking

GreatArtist said:
I have internet explorer 7 and firefox 2.

You must be very proud.
I set my web page to be XHTML 1.0 transitional.

I take it back.
I put the alt attribute in my image tags but they were only displayed
in firefox, not IE7.

I do believe that either you've got the browsers backwards or you're
talking about title instead of the al attribute.
So I changed all the alt attributes to title instead. That works in
both IE7 and Firefox.

Depends on what you mean by "works."
But now when I use the W3C xhtml validator, it tells me I should have
alt for all the image tags.
Should I include both title and alt in each image tag?

For images which comprise content, yes (I say). Backgrounds no.
Ornamental images are somewhat special; use alt="". See the discussion
at http://www.cs.tut.fi/~jkorpela/html/alt.html.
Why doesn't alt work in IE7? Didn't alt work in previous versions of
IE?

"Work," meaning "providing tooltips?" IE has sort of misused alt for
years/versions (maybe forever). But the alt texts are just meant to
stand in for images when they can't be displayed or seen. The title is
what should be used for tooltip-type behavior. AIUI, non-IE browsers
(except e.g. versions of Opera emulating IE) use tooltips based on
title, alternate texts based on alt.
 
Ad

Advertisements

G

GreatArtist

Jerka, you're a miserable piece of shit.
The other two guys were helpful and actually answered my questions.
Yes I just recently read books on HTML, XHTML, and CSS.
Tonight it just took me about 15 minutes to get all my web pages down
to zero errors on the W3C validator.

I don't care what you think about XHTML. I didn't ask you!
Garrick Chow, who I respect far more than you, recommends XHTML 1.0
transitional. I don't trust your opinions on anything since you're an
ass-wipe and a poor excuse for a human being.

Your overly simplistic web site sucks. It's worthless.
You're an idiot and emotionally stunted.
 
G

GreatArtist

Yes, you should have both.
As far as I can recall, the alt is meant to be displayed when the image is
missing, while the title is shown when you hover with the mouse pointer over
the image.

Alt has worked as title in earlier versions of MSIE, there can be two reasons
why alt don't generate a "pop-up", the most likely is that MS has a bug in the
code (which is quite common), or they wanted to follow the standard more closely.

Thanks for giving me a good answer, unlike Jerka and John.
Thanks for being a good person.
 
D

dorayme

GreatArtist said:
Thanks for giving me a good answer, unlike Jerka and John.
Thanks for being a good person.

Hang on there... what about me (ok, I am not human, but I feel
left out nevertheless)? I supplied crucial info about title in
anchors not being necessary. Did you go see Witness? A
masterpiece.
 
G

GreatArtist

Hang on there... what about me (ok, I am not human, but I feel
left out nevertheless)? I supplied crucial info about title in
anchors not being necessary. Did you go see Witness? A
masterpiece.

Haha, OK you too :)
I appreciate it.
Thanks.
 
J

John Hosking

GreatArtist said:
Why are you being a sarcastic jerk?


Regarding your link, I think the best thing to improve Usenet would be
for people like you and Jerka Korpela to stop making sarcastic, rude,
insulting comments that are unprovoked and stop being arrogant
assholes. Learn how to be decent human beings.

Decency is calling people "jerks" and "assholes"? Thanks for the new
definition. I guess I will have to revise my thinking.

HAND!
 
Ad

Advertisements

J

Jukka K. Korpela

Scripsit GreatArtist:
Jerka, you're a miserable piece of shit.

You're a disgusting coward who insults people, hiding behind a nickname. I'd
rather be pig's vomit or rotten shit than anything like that.
Yes I just recently read books on HTML, XHTML, and CSS.

There are lots of bad books on them. Besides, reading is not enough;
comprehension is required. You have already demonstrated that you didn't
learn much. You would need a good book on basics.
 
J

Jukka K. Korpela

Scripsit dorayme:
I supplied crucial info about title in
anchors not being necessary.

You didn't mention that they are of dubitable value, and besides, the issue
was title and alt attributes for <img>, not <a>.

Moreover, you were not insulted by "GreatArtist", so you must have written
something wrong, or irony that was too difficult to understand to he/she/it.
 
N

Neredbojias

Why are you being a sarcastic jerk?


Regarding your link, I think the best thing to improve Usenet would be
for people like you and Jerka Korpela to stop making sarcastic, rude,
insulting comments that are unprovoked and stop being arrogant
assholes. Learn how to be decent human beings.

Here's something you should realize. Jukka has learned English as a second
language, and being a very intelligent man, has done so very well. He
probably knows and uses it better than many native Brits, Yanks, and
particularly Australians. However, his primary vernacular, Finnish, is
more elemental in its constructs from being more primitive in development.
Having such a limited fundament naturally precludes the ability to access
many of the finer and sublime nuances of communication available in richer
languages - such as English. Ergo, it's quite possible that a certain
perceived intemperance on his part is nothing but innate frustration
resulting from semi-preceived possibilities available to less lingually-
constrained individuals.

--
Neredbojias

Scratched on wall of Tuscaloosa lockup #3:

The woman was
A real looker.
Too bad she war'nt
A real hooker.
 
E

El Kabong

Neredbojias said:
Here's something you should realize. Jukka has learned English as a
second
language, and being a very intelligent man, has done so very well. He
probably knows and uses it better than many native Brits, Yanks, and
particularly Australians. However, his primary vernacular, Finnish, is
more elemental in its constructs from being more primitive in development.
Having such a limited fundament naturally precludes the ability to access
many of the finer and sublime nuances of communication available in richer
languages - such as English. Ergo, it's quite possible that a certain
perceived intemperance on his part is nothing but innate frustration
resulting from semi-preceived possibilities available to less lingually-
constrained individuals.

Or maybe he's just feeling inferior due to a perceived sexual inadequacy and
is making feeble attempts at improving his low self-esteem by belittling
others.

El
 
B

Blinky the Shark

Neredbojias said:
Here's something you should realize. Jukka has learned English as a second
language, and being a very intelligent man, has done so very well. He
probably knows and uses it better than many native Brits, Yanks, and
particularly Australians. However, his primary vernacular, Finnish, is
more elemental in its constructs from being more primitive in development.
Having such a limited fundament naturally precludes the ability to access
many of the finer and sublime nuances of communication available in richer
languages - such as English. Ergo, it's quite possible that a certain
perceived intemperance on his part is nothing but innate frustration
resulting from semi-preceived possibilities available to less lingually-
constrained individuals.

You misspelled "You have nothing to teach anyone, Google Grouper." :)
 
Ad

Advertisements

S

Sherm Pendley

GreatArtist said:
I don't care what you think about XHTML. I didn't ask you!
Garrick Chow, who I respect far more than you, recommends XHTML 1.0
transitional.

Your respect is misplaced. XHTML, while nice enough in theory, has any
number of problems in practice that prevent it from being useful in the
real world.

I have far more respect for someone who has the backbone to tell it like
it is, rather than pandering to the clueless masses in order to make more
money from book sales.

sherm--
 
B

Blinky the Shark

Sherm said:
Your respect is misplaced. XHTML, while nice enough in theory, has any
number of problems in practice that prevent it from being useful in the
real world.

I have far more respect for someone who has the backbone to tell it like
it is, rather than pandering to the clueless masses in order to make more
money from book sales.

Is there any reason to create a new site in transitional *anything*, as
versus strict?
 
D

dorayme

Neredbojias said:
and particularly Australians.

I can see that you lie bruised and vicious still about our little
to and fro on the standards of stuffy old English grammar. (btw.
wanna give me a teensy weensy little hint of your secret figure
on the desert? You came up with a figure below 84,000 miles?)
 
Ad

Advertisements

D

dorayme

"Jukka K. Korpela said:
Scripsit dorayme:


You didn't mention that they are of dubitable value, and besides, the issue
was title and alt attributes for <img>, not <a>.

About anchors, I did not mention them in my first post and only
in my second when I was remembering the first, must have been
thinking of _one_ use for them in images.

Which brings me to the subject of use. Sparingly, surely they can
be wisely used as an extra but not essential aid. The practical
reality is that not everyone is new to a page and it is very
severe to require the page to be written on that assumption. Now
and then a tooltip on on image or on an image as link can be a
welcome addition to fill a gap in the harder task of making
everything transparent.

Why, I can think of an immediate use for one on just an image.
Deny that the tooltip on the first pic at

<http://tinyurl.com/ywvlg5>

is mildly useful for those who see it!
Moreover, you were not insulted by "GreatArtist", so you must have written
something wrong, or irony that was too difficult to understand to he/she/it.

We must not get too cynical! There is a tendency in many ngs for
some of the regulars to go in a little hard on newcomers. I see
them being painted into corners, their dignity hurt and they
behaving badly as do many of us when so treated.
 

Top