The ALT attribute for the IMG element is required??

liunx

Guest
Does anyone have any idea why the alt attribute for the img tag is required? It doesn't make much sense to me. What if I just don't want an alt attribute? Do I have to do something like this to make my html compliant:<br />
<img src=http://www.htmlforums.com/archive/index.php/"whatever.gif" alt=""><br />
<br />
<br />
As a side question, is the use of spacer images (those completely invisible gif images sometimes used to make sure everything's layed out correctly) discouraged now? I like to use them to make sure my table cells come out being the right size.<!--content-->in correct coding, yes, the ALT property should be included in the IMG tag.<br />
<br />
yes, you may have an empty ALT value as you exampled. although, since you put it in, why not put it to use?<br />
<br />
for layouts, a preferred method would be to use CSS positioned DIV areas. tables may still be used to display "tabular" data.<!--content-->re: in correct coding, yes, the ALT property should be included in the IMG tag.<br />
<br />
I've never had a problem with the ALT tag in <IMG SRC> if i don't need it i don't add it, what type of browser do you say requires it??? some new imaginary one!!!<br />
<br />
never had a problem excluding it...! jaeman<!--content-->and what do the poor text-mode browser guys do, they are always thankfull of the ALT attribute, and many other situations such as people having images turned off to increase surfing speed, and SE's use them!!!<!--content-->The only problem with excluding it is the html validators complain about it. Also, it appears to be pointless to put a DOCTYPE in the page if you have images without alt attributes, because such tags wouldn't be compliant.<!--content-->it's not the only problem jaemen, see what i said above, search engine spiders view html pages as a text-browser would, they give , although less these days, weight to your alt text, and with google evolving constantly soon will be the day when your page is positioned not only in regards to relevance but to the actual quality of your coding and quality of the page in general, even spelling will be factored into it. <br />
My advice, don't be lazy and include your alt text!!<!--content-->The alt attribute values are also read out loud by the screen readers used by some disabled folks. Using these attributes aids site accessibility. The last olympics website was fined millions for not having an accessible website. <br />
<br />
<br />
They are also important to browsers with images turned off, or where images failed to load. Include the alt attribute all the time, but leave the value blank only on non-important images.<!--content-->That's what I don't get, though. If it's going to be blank, why put it in to begin with? If an image is there purely for looks, there's no need for it.<br />
<br />
I guess I'll just be leaving it blank..<!--content-->The visual equivalent of alt="" reads like the print version of:<br />
<br />
This page intentionally left blank<br />
<br />
<br />
<br />
Think about it.<!--content-->i thought there would be somegood feedback, i will take into respect what leo had to say, i mostly include ALT with my pics & very rarely don't include it, but i still agree with tygur also "if your going to include it give it a tag"... jaeman<br />
<br />
<br />
<br />
pickup line no.13 I saw you the other day & you looked so sexy, like that model whats her name!<!--content-->
 
Back
Top