i've noticed that when i use the <alt> tag and rollover an image the alternative text doesn't show up, it only show's up when i use the <title> tage... do i need to be using both?
i've noticed that when i use the <alt> tag and rollover an image the alternative text doesn't show up, it only show's up when i use the <title> tage... do i need to be using both?
According to the standard, alt is required. It may be empty though:
Except for IE, no browser uses alt as a rollover tip. If there is a title specified, IE will use the title. If there is an alt and an empty title, IE will show no rollover tip.Code:alt=""
IE is the exception but, as long as you follow the standard, you will be OK:
Provide alternate content (text) for images using the alt attribute. This will only be used if the image is missing or someone is using a browser for the blind or a text only browser - except in IE where it will be a tip if no title (even an empty one) is specified. Use an empty alt attribute if the image is purely decorative.
Provide rollover tips, if desired, with the title attribute.
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
So should I porvide both or is that overkill?
The alt attribute is required. The title attribute is optional. I already explained how these two work. It is up to you (what effects you want) how you use them. Just make sure to at least have an empty alt attribute.
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
In short:
1. alt gives you validation
2. title gives you a rollover message
(3. alt gives you a rollover message in IE only, only if title is missing)
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
4. alt is designed for people with disabilities, so they can have a brief description of the image.
Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
Currently: enjoying the early holidays :)Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide
Sorta. It's the alternate to the image, to describe it if needed.... for those without vision, for when the image doesn't load, is corrupt, and other situations.
I believe, though, that title also would suffice for some of this, in that a screenreader for the blind would likely find that important, especially if alt was blank or missing.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
Random Google Result:
In HTML authoring, there are very good reasons to include an alt attribute into every img element. The purpose is to specify a textual replacement for the image, to be displayed or otherwise used in place of the image. Thus, the prime rule is: Consider what the page looks like or sounds like when images are not shown. Then, write for each image an alt text that best works as a replacement. This document also gives more specific suggestions for simple, common situations, and some uncommon too. For content-rich images, it recommends explicit links to textual alternatives.
Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
Currently: enjoying the early holidays :)Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide
So then should you use both <alt> and <title>??
Well, it is up to you.
Another Google Result:
The title attribute is intended to provide supplementary information about an element; for example, it might be used to provide extra information about the target of a link. Although the User Agent Accessibility Guidelines (UAAG) requires access to all content, current user agents provide very poor access to title text information, and what access they do provide is typically inaccessible for people with disabilities.
Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
Currently: enjoying the early holidays :)Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide
Bookmarks