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 this still considered true about INTERNAL anchor text? "Penguin seems to be targeting overly aggressive anchor text (both internally and externally), especially from low-quality sources."
Recently I've heard a few people say now it's okay to be aggressive with internal linking. So a link from mydomain.com/news to mydomain/widgets can use spammy anchor text like "best green widgets in California" that are an obvious problem for links coming in from external site. Which is accurate?
On-Page Optimization | | corlin0 -
How do you check if press release images are different enough?
We're helping a Sydney blog called Happy develop their local following and we're starting by ensuring their posts are optimized. They're doing a great job with reviews and content but the one thing we noticed is that all the images they use (because they review music) are from bands and artists that are used tens if not hundreds of times in other places. We're trying to set up a simple way for them to tweak these images to ensure they're crawled and seen as original. Anyone had to deal with this and found a solution that makes sense?
On-Page Optimization | | wearehappymedia0 -
Internal link text
Hi With internal links, should I make sure to always use the same anchor text im trying to rank the page for? For example im having a tidy up and have realised im linking to the same page in multiple blog posts using different anchor text. Whats the rule of thumb here? Thanks Chris
On-Page Optimization | | mrcsleonard1 -
Text in collapsed section
Does anyone have any quantifiable evidence regarding text that is collapsed - when clicked the section expands and presents the text, against just having the text on view in the page. That is, instead of having a FAQ with question followed by answer, there is a question which you click to expose/expand the answer. Could the collapsed text be potentially detrimental to ranking?
On-Page Optimization | | MickEdwards0 -
E-commerce On Page Concern - Links and Anchor Text
Hi, how you doing? I have a set of very specific questions or concerns about anchor text and linking on an e-commerce category page. I was wondering if you could give your opinions and counsel. I own an e-commerce store about steel construction products. I have several category and product pages. One example of my categories is this. URL http://aceromart.com/Losacero-25-Ternium.aspx My concerns or questions: I have several technical specs or sheets. Which i include the link on the right part in "Informacion Adicional". How should i link those? I am bit worried on the anchor text. Should i use something like [download "product" technical sheet] or just [technical sheet of product] . I dont want to cannibalize, but i also want to appear as descriptive as possible. what would you recommend? The same thing happens on my videos. How should i link my videos? Is there a best practice? **what would you recommend. ** Thanks in advance for your opinions!
On-Page Optimization | | JesusD0 -
Internal Link Title and Anchor Text Question
So, I am kind of a newbie with all of this stuff, so please bear with me! If you have a chance to look into the domain it's www.noip.com I have checked the internal followed and 301 links. It seems like it is pulling in all of our navigation a funky way. all of those link have no data for the title and the anchor text is Home, Contact Us, Forgot Password?, ETC. Is this correct? I have tried to look into the way other websites are doing it and it seems wrong. I tried to talk to my developer, but he is not so sure. Do we simply need to make more copy on our site that has internal links within the copy with anchor text that is for keywords that I would like to be ranking for? Like Managed DNS? and then that page goes to the managed DNS page? Or what? Sorry if i am not being totally clear. Any help and advice is 110% welcomed!!! Natalie
On-Page Optimization | | vwnatalie0 -
Flickr v. On-Site Images
My apologies in that I have searched for this, have seen discussions on it and haven't seen a definitive answer on the question of hosting & displaying on-domain images v. using a source like flickr to host all of your images. I have a client that is mostly a local search play in a very tourism heavy area. I'm investigating this option for a few reasons. 1. Ease of use. The new flickr app is brilliant. So if he's out giving a tour, takes a picture, it can be seamlessly integrated to his account & then shot off to all of his portals (website, facebook, twitter, etc.). It's a small client & he's not tech savvy, so this option suits him very well. 2. SEO. With all of the tagging, geo components, and it playing nice with Google Images search, I thought this was a viable option in hosting the majority of his on-site images. I've seen opinions on this before. But I was wondering if there any further opinions on the subject. Not sure if there's anything 'definitive', but any help or insight would be appreciated.
On-Page Optimization | | BrianWhitaker0 -
Any opinions about the common anchor text?
Hey guys so I was reviewing my website to make sure there are no exact anchor texts repeated throughout the site. But I was wondering what are your thoughts about the common (and useless) anchor text like "read more", "learn more", "see more information", "contact us", and things of that nature. These are usually repeated across the majority of sites out there, how does Google differentiate between over optimized anchor text and these common anchor texts?
On-Page Optimization | | nrv0