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
-
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 -
Advanced tags in images
Is it true that one can improve image seo by adding metadata to the details (right click image and choose details), like tags and comments. I never heard of doing this before. It seems like grasping at straws.
On-Page Optimization | | Webzenz0 -
Link anchor text in list menus
Obviously Google likes descriptive anchor text. At least the first version on the page. But suppose you had a list of scrap yard depots on a hover site menu, would you go for the person friendly nested list, so Scrap Yard Depots Newcastle Chester Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch Or the presumably more Google friendly; Scrap Yard Depots Newcastle Scrap Yard Chester Scrap Yard Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch Scrap Yard
On-Page Optimization | | JamesFx0 -
Nofollow images to sculpt internal anchor tags
One of my client tags image-links with nofollow if those links are before a regular HTML link in the source code, e.g.:
On-Page Optimization | | Sebes
.
.
.
Check our page aboutreally cool shoes. They do this to "better pass anchor tags" to the page /page-about-shoes.html. My question: Is this a good practice to do? Thanks Sebes0 -
Anchor text on outbound links on a blog, relevancy detrimental or positive?
We have a blog related to computer support, and we have been using guest posts and promotion of those posts to boost freshness and rankings of the blog. We have been restricting outbound links to prevent words such as 'computer repair, 'computer support' etc, because we were under the impression that if we want to rank for those words, we should only allow INCOMING links with that anchor text, and that outbound links from the page, would rob the other parts of the site of the link juice this page provides. My question is, is this wrong? Should I freely allow outbound links on my blog page that contain anchor text that I my self am trying to rank for? Or was I correct initially? Current the anchor text is in 'related' industries, such as mobile apps, technology news, etc...things that google might think are 'related', but not exactly what the site is about.
On-Page Optimization | | ilyaelbert0 -
How to get Google images traffic?
How to get Google images traffic? Take a look at traxnyc.com and sugest what we can improve. Thanks in advance.
On-Page Optimization | | DiamondJewelryEmpire0