By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,676 Members | 1,759 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,676 IT Pros & Developers. It's quick & easy.

Format alternative Text

P: n/a
How can I do to format the text shown in alt="..."
Is it possible to define the size of the field?, colour of background, font, etc?
Thank you
Bettina
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On 13 Jun 2004 07:32:56 -0700, Bettina <be*****@coaster.ch> wrote:
How can I do to format the text shown in alt="..."
Is it possible to define the size of the field?, colour of background,
font, etc?
Thank you
Bettina


IE might be the only browser that puts alt text in a popup tooltip. The
title attribute is what appears in the tooltip in all browsers. The alt
text can only be expected to appear in place of an unrendered image.

Bearing that in mind, yes, you can apply CSS to the img element which will
affect (in many browsers) the rendering of replacement alt text. Or you
can include the image within heading tags to get the text to be understood
and rendered as a heading.

"Size of the field" ... I'm not sure what you mean.
Jul 20 '05 #2

P: n/a
be*****@coaster.ch (Bettina) writes:
How can I do to format the text shown in alt="..."
Is it possible to define the size of the field?, colour of
background, font, etc?


With CSS, certainly. Not sure what you mean by 'size of the field',
but for the rest:

img {
font-family: sans-serif;
color: #c00;
background: #fff;
}

Browser support varies. It works fairly well in modern graphical
browsers with image-loading disabled, most text-mode browsers don't
support it, though. And it's meaningless in speech browsers,
obviously.

If you mean reformatting the thing that you get when hovering over an
image in IE, as far as I know that can't be reformatted. Furthermore
you shouldn't be using alt for that anyway, use alt for an alternative
and title for supplementary information like the hover.

--
Chris
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.