jodygrenier Posted June 16, 2010 Report Share Posted June 16, 2010 Hey Everybody! I'm doing Web Design 1 and I'm trying to get the alt attribute to work on my image, but it's just not working. When I put the pointer on the image, I don't get any text at all. I checked the code and it seems like I've done everything as per the video, the only thing I changed was that I used a .png file instead of a .gif file. Any suggestions?? Thanks, Jody Quote Link to comment Share on other sites More sharing options...
Andrea Posted June 16, 2010 Report Share Posted June 16, 2010 The alt attribute is to describe the image in case the image is for whatever reason not viewable. If you want something to pop up on hover, use the title attribute. Quote Link to comment Share on other sites More sharing options...
jodygrenier Posted June 16, 2010 Author Report Share Posted June 16, 2010 That makes sense, though in the video he doesn't mention anything about a title attribute and it seems to work for him. Either way, I am guessing that I just write in; title="text here" or is there some kind of abbreviation for the title attribute? Thanks for the quick reply. I appreciate it! Quote Link to comment Share on other sites More sharing options...
Andrea Posted June 16, 2010 Report Share Posted June 16, 2010 IE actually shows what's with the alt tag - at least 7 and older, not sure about 8. And title="text here" is correct. Quote Link to comment Share on other sites More sharing options...
coollew Posted June 17, 2010 Report Share Posted June 17, 2010 One of the first things I noticed no it does not work for me in IE 8 title does but it still should be used. Quote Link to comment Share on other sites More sharing options...
Andrea Posted June 17, 2010 Report Share Posted June 17, 2010 Yes, the alt tag should always be used - it's part of standard-compliant code. It needs to describe the image for those who cannot see it - for whatever reason. If the image is purely decorative and does not contribute to the content, the alt tag is still required, but it can be left empty. As in so: alt="" The title tag is optional. Quote Link to comment Share on other sites More sharing options...
LSW Posted June 17, 2010 Report Share Posted June 17, 2010 Most people consider Micro$oft wrong. The alt attribute is an ALTernate for the image when blind users use the site or images are blocked for some reason, like many cell phone users to save bandwidth and be faster. You describe the image, if for instance it is my daughter with Gov. Parnell that is what I write. If it is maybe a nice picture of a building, you can say "The glacier Visitor Center glowing under outside lights in heavy fog." Of course you have to ask yourself if the photo is important? If I am writing about the glacier then it is more decorative and can have an empty alt attribute, if I am talking about the building then I would leave it described. If you do not do this, those users such as blind users will wonder what they are missing and a screen reader will read the name of the image instead, im17_2010.jpg is useless and irritating for them. As for decorations, who cares if it is the top left hand corner squiggly design. The empty alt will cause the image to be basically ignored by a screen reader. Back to the IE team, they chose to take the standards and in there interpretation, have the alt attribute appear like a title attribute. ALL other browsers took the common interpretation that as alternate text, it should only appear when the image is not shown. If it is alternate to the image, why would you show both? Also keep in mind it is a quick text. There is a "longdesc" (Long Description) attribute that links the image to another document with a longer description, say for a Pie chart of expenses. Most however figure that id the description is to long for the alt attribute, then it should be in the content anyways, so it is not often used. Lastly, under titles. Do not use under titles & alt. If you have a photo of yourself with an under title of your name and do the same with your alt attribute... then a screen reader will read both, in my case Image Kyle Lamson Kyle Lamson. You must always have the alt attribute on every image, but you do not always have to fill it in unless it carries important info for the user. Quote Link to comment Share on other sites More sharing options...
JoomlaTraining Posted July 14, 2010 Report Share Posted July 14, 2010 Agree with Angela. If you want to hover you need to add in title but remember having keywords in your alt tag will help with the on page SEO so I normally use both. Say my keyword I want to rank for is click the code would look something like this? <p><img src="images/stories/clock.jpg" border="0" alt="Clock - Tick Toc" title="Clock" /></p> Quote Link to comment Share on other sites More sharing options...
LSW Posted July 14, 2010 Report Share Posted July 14, 2010 Yes that is one way to misuse the alt attribute. It is for alternative user agents, not SEO. If it is just a image of a clock, then ideally it should be left blank as it is of no particular importance to the user as you describe it here. You should really use the tags for what they are meant for, in this case people with disabilities or other forms of user agents. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.