The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
> They don't need describing, but my code will be 'unacceptable' if I don't.
You and I can clearly see that, but the validator, text based browsers and screen readers don't know that.
Some browsers and devices have default text they put in place of an image that doesn't load - lynx for example, the text based web browser, writes the word 'image' in place of an image.
An empty alt tag is used to state that the image has no meaning (overriding any default which exists). If you don't include the alt tag for non-meaningful images, screen readers may read the default word 'image' out every time.
It's not so much an issue with the likes of Firefox, IE, etc as they don't appear to have default alt text (and even if they did, visually people could skip over that easily), but more for accessibility reasons, which xHTML was written to accommodate.
Accessibility is a much bigger issue than it was a few years back.
> Ouch. I remember having to use blank spacer gifs. They suck.
What's wrong with them? As long as you define them properly, and don't use them excessively, there's nothing wrong with them.
> I'm going to learn CSS proper soon - only using it for text/form
> formatting right now.
I've been really impressed with the results I've managed to get. It can drive you *mental* at times, but benefits far outweigh the "NOOO! WHY ARE YOU DOING *THAT*!" moments. Well, for me anyway. :)
Old company home webpage - 12k. Move to CSS / Xhtml / PHP / MYSQL /Apache(all new technologies to me) - three weeks. Population of database included.
New company home webpage - 4.9k. With far more information. No tables, no fonts, and I can whack a complete redesign on in less than a day.
> That wasn't what I was saying at all, infact I wrote a big article on
> this at Uni. Sometimes I use a blank image to fill a gap, or make
> sure a table is a specific width. They don't need describing, but my
> code will be 'unacceptable' if I don't.
Ouch. I remember having to use blank spacer gifs. They suck.
> monkey_man wrote:
> So, I'm meant to put alt tags for every single image I use then?
>
> Yes, because it describes what the image is. Blind people can't see a
> picture, but a screen reader can describe it via the alt tag.
> Browsers also display the alt text in place if an image can't
> be loaded, be it because the src attribute points to the wrong
> address, or people have images turned off in their browser.
>
> If the image isn't classed as part of the relevant content (i.e the
> image is just a spacer, border or a rule across the page) then an
> empty alt should be used.
>
> The W3C believe and promote that the web should be accessible to
> everybody on any type of device, and write the mark-up specification
> to accommodate this belief.
That wasn't what I was saying at all, infact I wrote a big article on this at Uni. Sometimes I use a blank image to fill a gap, or make sure a table is a specific width. They don't need describing, but my code will be 'unacceptable' if I don't.
> So, I'm meant to put alt tags for every single image I use then? F**k
> off.
Nowt to it, if using a database especially.
function listEmployees(){
echo'
******* Staff
';$DB = new DB;
$sql = "SELECT *
FROM employee
WHERE display = 1
ORDER BY employeeid";
$result = $DB->query($sql);
echo '
- ';
',$row["firstname"], ' ',$row["lastname"],'
';
echo 'alt="Image Of ',$row['imagealt'],'" />';
echo '',$row['title'],'
';
echo '',$row['email'],' ';
while ($row = $DB->getRow($result)) {
echo '
}
echo '
$DB->close();
}
> Tyla wrote:
> Has no effect on the Alt text, just acts similar to applying a
> specific class, just more precise.
>
> Did you know you can style the alt text - font, colour, size,
> weight?
Knew you couls using title applied to images and styling title in the CSS
> Has no effect on the Alt text, just acts similar to applying a
> specific class, just more precise.
Did you know you can style the alt text - font, colour, size, weight?
> Tyla wrote:
> Something like
>
> IMG[alt="my image"] {...}
>
>
> So how does this work exactly? You mean you can apply styles to the
> alt text via that method? What limitations are there?
It applies the style to that element, who's attribute matches that value...
Has no effect on the Alt text, just acts similar to applying a specific class, just more precise.