I just read an article recommending the use of alt tags for background images. It says to use keywords for alt tags but I thought that search engines hated this. Who's right? How can I add alt tags to background images in Dreamweaver?
Using keywords for alt tags is fine, and even a good idea as it will help your keyword density - just don't overdo it or you may run into trouble with the search engines. In dreamweaver, click on the image you wish to add an alt tag to and then look in the properties area at the bottom of the page and you will see ALT with a box next to it - just add your text in here.
As far as I know, there is not alt attribute for background images. Any links to the question & I can ask some more web developers as well
You can't put ALT attributes for background images. On a similar topic I have found ALT text to be useless for SEO. Use it for accessability and to help people browsing without images (like me on my smartphone).
Thanks flak. I thought so as well, just always like to make sure. The ALT tag is required though for images elsewhere if you are trying to validate your code
Yes that is correct... for any <img src="#"> links, an alt="" attribute is required... (Good for everyone, especially accessible users).
hope i'm not too late to jump in, almost a year since the last post here... although there is no way apparently to put an alt tag on a background image ( using url: image src ) in your css, i think it may be legitimate to put a one pixel image in and use the alt tag there, as long as it is relevant to the background image. Not sure if you will get penalized in search for that?? I'd like to know what others might think of that.
I don't understand what you mean. Why would you include a 1px image in your markup for every background image that you use? What's the benefit? If it's just so you can add a few more keywords in the alt attribute, then I would have to disagree. Alt attribute keywords have litle SEO effect, in my experience. It's simply not worth the effort. Plus, it's bad practice and amateurish. Alt attributes are necessary for people who use screen readers or people who have disabled images. Background images are not part of the main content, so use of alt attributes is not necessary. Throwing in additional 1px <img> elements with keyword-stuffed alt attributes will only confuse the content for people for whom alt attributes have a use.
hi masterful - seems you perfectly understand my meaning! you outlined the benefits after saying there weren't any? logical! i went over to seomoz.org to take a look and looked around there, seems there is some consensus as to alt tag importance. My beef really is for the use of background images when they could just as easily be put in as an image in the document, allowing for alt and title tags. Not just for accessibility or 508 reasons, and not just for valid doc reasons, but also for search and for screen readers. not using alt tags ? can't find a reason for that...
I didn't outline any benefits. I said it was bad practice and amateurish. Maybe you should re-read my post. Alt attributes are very important for users of screen readers and users whose images are disabled. Alt attributes have little impact on SEO. Background images can only be set using CSS. I don't understand what you mean. Let me repeat myself . . . Including 1px <img> elements in your markup for the sole purpose of representing background images and allowing the inclusion of additional alt attributes is bad practice and amateurish. Alt attributes do have an impact on SEO, but it's minor compared to other factors.