Moz Q&A is closed.
After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.
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
Browse Questions
Explore more categories
- 
		
		Moz ToolsChat with the community about the Moz tools. 
- 
		
		SEO TacticsDiscuss the SEO process with fellow marketers 
- 
		
		CommunityDiscuss industry events, jobs, and news! 
- 
		
		Digital MarketingChat about tactics outside of SEO 
- 
		
		Research & TrendsDive into research and trends in the search industry. 
- 
		
		SupportConnect on product support and feature requests. 
Related Questions
- 
		
		
		
		
		
		SEO Implications of using Images for Article Titles
 Hi guys! New to Moz Pro. I just recently completed an online course with Moz... I have a client who is writing some new content for their site, and we are approaching it with SEO in mind. I was wondering about using an image with text on it as the article title, instead of an actual "text on the page" title. Wondering if that's going to "cost" us anything, SEO wise. I guess we could use alt-text/title/description fields to make sure the keywords are crawlable for our article title but do they have less "weight" than a standard title? How does that work? Hope my question makes sense. Article header attached mB0PXsA.jpg On-Page Optimization | | JakeWarren1
- 
		
		
		
		
		
		How to find all broken images?
 Are there any free tools that will crawl a full website and report back on any broken tags? My site recently added several thousand previously archived posts, many of which contain old tags that no longer exist. ScreamingFrog's crawl is too limited to reach most of these posts, and I haven't been able to find another free tool to get the job done. If there's no free tool, does anyone know of an affordable paid alternative? On-Page Optimization | | WebElaine0
- 
		
		
		
		
		
		Image File Names for eCommerce?
 Hi everyone! I'm wondering about naming my product photo file names for an E-Commerce site. Let's say I say have product named Abe Lincoln in the **Print **category for sale with 4 images, relatively similar but from different views for example.Could I name them as follows? 1) abe-lincoln-print.jpg 2) abe-lincoln-print-side-view.jpg 3) abe-lincoln-print-close-up.jpg 4) abe-lincoln-print-font-view.jpg Or is that too many keywords for the page? Should I be worried about keyword stuffing? Plus once I add in title and alt tags and descriptions this could also increase the keyword count for "abe lincoln print"? On-Page Optimization | | TheFlyingSweetPotato0
- 
		
		
		
		
		
		Alt text / internal linking
 Hi everyone A question about best practice when linking from pictures on our homepage - hirespace.com We have an option of using divs with background images (nicer in terms of design) but it means that we can't use anchor text or alt text to show Google what these internal links are about. The other option is to use images which do not allow us as much flexibility in terms of CSS but would allow us to use alt text. There is also an opinion that we should have separate text links at the bottom of the homepage to get the anchor page in. What is best practice in this situation - is alt text worth sacrificing some CSS flexibility for? How important is anchor/alt text for internal linking? Thanks guys. On-Page Optimization | | HireSpace0
- 
		
		
		
		
		
		Help Please! - Anchor Text in the Menu
 Hi everyone, I am a SEOMOZ newbie and I have been learning about SEO for a while now whilst working on my site - lockcity.co.uk - I already understood the importance of anchor text but was amazed to learn how google only count the anchor text used in the first link (http://www.seomoz.org/learn-seo/anchor-text). My questions are - does this rule still apply? and if so do the menus really count as the first link? If I went on this approach, this would make my menus too long for e.g. on my 'Auto Locksmith' page, my targetted keywords are 'Auto Locksmith' but also the town keywords need to be included. I really thought I had this covered on the home page by making sure the anchor text and alt text were keyword relevant to the link, but looks like Ive been missing out on an opportunity. Our business is slightly complicated in that the 25 mile radius we cover includes 4 different regions - therefore I feel like I always have to get these keywords in as well to make sure we get traffic from our area. Thanks for any advice you can give! On-Page Optimization | | LockCity0
- 
		
		
		
		
		
		Alt Text On Buy Buttons
 Hello, On a E-commerce site with multiple buy buttons on the page (11 by Default). Should I be blocking the alt. img on these? when I use the seomoz toolbar and view my page I see this Buy Now • Buy Now • Buy Now • Buy Now • Buy Now • Buy Now • Buy Now • Buy Now • Buy Now • Buy Now • Buy Now • Buy Now • Buy Now • Buy Now • Buy Now • Buy Now • Buy Now • Buy Now • Buy Now • Buy Now • along with other alt imges on page, Thanks On-Page Optimization | | TP_Marketing0
- 
		
		
		
		
		
		Do images on a CDN affect my Google Ranking?
 I have recently switched my images to a CDN (MaxCDN) and all of the images within my post are now get loaded directly from the CDN. Will this affect my Google ranking? Do Google care if the image is hosted physicaly on the domain? On-Page Optimization | | Amosnet0
- 
		
		
		
		
		
		Do images work as a H1
 Is a h1 tag wrapped image with a optimized alt tag as effective as text wrapped in a h1 tag? On-Page Optimization | | EAOM0
 
			
		 
			
		 
			
		 
			
		 
					
				 
					
				 
					
				 
					
				 
					
				 
					
				 
					
				