Background Images and ALT text
-
We pretty much exclusively use background images for our sites. How do I add in alt text? I tried a Google search for this issue and the best answer I could find was "Use the 'title' tag in the containing div", but that was from 2010.
Is there a better way to do it? And no, we're not going to switch to using standard images, because background images are way more slick for UX.
-
Does it has any positive effect on ranking? (seo)
-
You can't use ALT text to background images.
If your images are loaded as img tag then you have title, alt. Example:
But background images isn't regular images loaded with img tag. They can be loaded only with CSS styling. And therefore they doesn't comes with title and alt. Example:
As you can see you can't use title or alt for image there. Only way is to define title as this:
or better this one:
I know that isn't 100% background but also helps.Alternative way can be ARIA. If you love background images but really wish alt text you can use WAI-ARIA and define them as:
...
But GoogleBot doesn't support aria-label for now. -
Yes for screen readers and using it as alt and title for your images that are there. So you are not trying to trick Google, you are trying to figure out a way to mark what is actually there. For google image search, I have had success ranking images even if used as backgrounds in divs by naming them with what I was trying to rank them for. Since I could not use alt or title I named images with my target in them. These images were all for a brand query.
Example: image on mybrand.com named mybrand-imageName.png
we were able to get most of those images to show up when doing an image search for mybrand
-
I'm going with "Google is too smart for that" on the transparent image alt text front. I guess it would help out people using a screen reader, but I'd like to get some of the images into Google image search. It seems like alt text is pretty much required to rank for that?
-
I think that adding title to the div is the only way for you to do a background image in CSS.
You can cheat a little by then loading a transparent image in the container that the background image is in, make this transparent image have an alt tag and title tag for whatever your background image is about.
If you are doing this for seo purposes this should work, if you are doing it to have the html well formatted, there is only the div tag.
Cheers!
-Erick
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Is moving text out of the main body field a bad idea for SEO?
Hi, I manage this WordPress website http://www.the-fireplace-company.co.uk I've been looking for ways to improve the product template and have come up with the following http://www.the-fireplace-company.co.uk/product/the-alhambra-fireplace/ - you can see how this compares to the old template http://www.the-fireplace-company.co.uk/product/the-burlington-fireplace/ Basically I've moved the description copy for the product from the main body to an alternative field and disabled the reviews tab below the product images to give a more compact feel and better use of the space available in my humble opinion! The client approves too. However I was just about the change all the other products to match this one - but suddenly thought is is wise to move all text out of the main body just to improve the look? I wondered what impact this might have on search. Any pointers would be welcomed. One course of action might be to find a new theme that's just a little more accommodating! Or to develop this theme further to ensure the main body copy is displayed where I want it to be? Regards to the Moz community - thanks for reading. Nathan
On-Page Optimization | | nathangdavidson0 -
[HELP!] File Name and ALT Tags
Hi, please answer my questions: 1. Is it okay to use the same keyword on both file name and alt tags when inserting an image? Example: File Name: buy-lego-online.jpg ALT tag: buy-lego-online Will it trigger Google Panda? Will I be penalized for that? Or the file name and alt tags should be different from each other? Because when inserting an image on Wordpress, the alt tags are always the same as the file name by default. 2. For example, I have 2 images in a page (same topic/niche) and I will put "cheap-lego-for-kids" and "best-lego-for-sale" as alt tags. Considering that I repeat the word "lego", is it considered keyword stuffing? Will I be penalized for that? Thanks in advance!
On-Page Optimization | | bubblymaiko0 -
How to name images for billingual website ?
I have a website where images are based on a different domain. And i am calling only one single image for english and french version. I m wondering if it s valuable to use both languages in naming the images like Apple-Pomme.jpg or if there might be any drawbacks.Thanks !
On-Page Optimization | | ennick0 -
Replacing text with images
Hello, My client is a "cheap calls" site which is offering calls to around 300 countries in the world. The pages for each country are almost the same, as they are mostly terms and conditions of making a call and explanation of the process how to do it. The copy is quite long (more than 850 words) and the country name is repeated about 26 times in the text. The country name and the phone number is the main difference between the pages, which makes them almost the same. I have recommended to add testimonials to each country and towns within the country, but I am afraid it will not dilute the similarity between the pages enough for Google to stop seeing them as duplicated. Also the client do not exactly rush to publish the testimonials for every country. The rankings are not too bad and all seems fine, but in the long term I know we need to do something. I am not sure if the client would agree to shorten up the copy, as they believe in old style seo with keyword stuffing and bolded keywords but I would like to overcome that problem with exchanging the most of the copy with an image. I would write a new copy for each page making it unique (around 2-3 paragraphs) and the rest would be an image stating exactly the same thing as the copy now to provide the same amount of info to the user. Theoretically it should help to resolve this problem, but would like to check if anyone has done something like that and if it worked/may work. Are they any other implications?
On-Page Optimization | | ThinkingJuice0 -
Is thumbnail text crawlable/lists of product names considered as normal copy in terms of keywords?
On a page that lists products (thumbnail text repeating the same word when you sell variations of the same thing) and also has copy at the bottom, are the product names crawlable? Is it better to avoid repeating the keyword in the copy? Can you get penalised for it?
On-Page Optimization | | LawrenceNeal0 -
What should I put in the image ALT and title text for blogger?
Hello, I wanted to know what should I put in the image ALT and title text for blogger. I've read so many damn articles about ALT text and Title text for blogger; nothing explained what I put in it though. What am I supposed to put in it that will help me with my on page optimization? (Stuff like do I use spaces or dashes, do I put my keyword in there, how many characters should I not exceed, do I put one word or two words?) If I have a picture of a backpack, what should the alt text be? What if I have 10 different pictures of backpacks on 1 page? How about if I had a backpack next to a tv in an image? A specific answer or a detailed one is nice!
On-Page Optimization | | 6786486312640 -
Lots of links on homepage to internal pages with keyword rich anchor text - problem?
Hi, All! We have a new potential client, that when looking at his site with a tool, we noticed that the previous SEO company they worked with filled the homepage copy with lots of keyword-rich anchor text links pointing to different pages on the site - many links going to the same page, just with different keywords. These links are not indistinguishable in format from the other text, which is why we only noticed it with a tool. I certainly wouldn't recommend doing that to start with, but once all these links are there, would you recommend taking them down? Is there any conceivable chance it could help the site? Is there a significant reason to think it will harm the site? Or will it just be pretty neutral? In all that's been written (much by SEOMoz) about only the first link's anchor text counting, do subsequent links work like a no-follow in the sense that they are a waste of the link-juice of the page, or is it as if they aren't there at all? (And is "only the first link counts" still the most widely held theory, or have there been new developments since?) Thanks, All!
On-Page Optimization | | debi_zyx0