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.
For an image which is in the CSS and not the HTML, can you add an alt tag?
- 
					
					
					
					
 I would like to improve SEO on a page with three big images, which are currently hosted in the CSS. The sample I am working with is at http://xquisitevents.com/about-us/ and I put my cursor over the big picture of the wedding dress with bouquet, I inspected the element and saw this code in a div tag: #upperleft { - background-image:url(images/AboutTopLeft.jpg);
 Can I add an alt tag to the CSS somehow, or can I have it added to the HTML? What is the best way to handle this, to include keywords like exquisite weddings and special event designs? 
- 
					
					
					
					
 further to this you could look at having the image above some text and the text describes the image -- using z-index to layer them - hope that makes a little sense... if not google z-index  
- 
					
					
					
					
 Hi Bridget, There is no alt attribute in css, so no you cannot add it there, There are a couple of things you can do. 1. Optimizing your image file names will at least give an indication of what the image is about and 2. Rethink your css and the use of background images. Specifically you could get the same effect as you have now without background images using a combination of absolutely and relatively positioned divs. This way you can have the same layout as now but with the image in the html rather than the css and alt tags will be available for them. Check the link here for some demo code: http://stackoverflow.com/questions/8708945/how-to-position-text-over-an-image-in-css Hope that helps! 
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 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
- 
		
		
		
		
		
		I am trying to generate GEO meta tag for my website where on one page there are multiple locations My question is, Can I add GEO tagging for every address?
 Am I restricted to 1 geo tag per page or can i add multiple geo tags ? Technical SEO | | lina_digital0
- 
		
		
		
		
		
		Image Search
 Hello Community, I have been reading and researching about image search and trying to find patterns within the results but unfortunately I could not get to a conclusion on 2 matters. Hopefully this community would have the answers I am searching for. 1) Watermarked Images (To remove or not to remove watermark from photos) I see a lot of confusion on this subject and am pretty much confused myself. Although it might be true that watermarked photos do not cause a punishment, it sure does not seem to help. At least in my industry and on a bunch of different random queries I have made, watermarked images are hard to come by on Google's images results. Usually the first results do not have any watermarks. I have read online that Google takes into account user behavior and most users prefer images with no watermark. But again, it is something "I have read online" so I don't have any proof. I would love to have further clarification and, if possible, a definite guide on how to improve my image results. 2) Multiple nested folders (Folder depth) Due to speed concerns our tech guys are using 1 image per folder and created a convoluted folder structure where the photos are actually 9 levels deep. Most of our competition and many small Wordpress blogs outrank us on Google images and on ALL INSTANCES I have checked, their photos are 3, 4 or 5 levels deep. Never inside 9 nested folders. Technical SEO | | Koki.Mourao
 So... A) Should I consider removing the watermark - which is not that intrusive but is visible?
 B) Should I try to simplify the folder structure for my photos? Thank you0
- 
		
		
		
		
		
		Multiple H1 Tags on Page
 Can having multiple H1 tags on a webpage be detrimental to its rankings? Technical SEO | | AubbiefromAubenRealty0
- 
		
		
		
		
		
		Can a CMS affect SEO?
 As the title really, I run www.specialistpaintsonline.co.uk and 6 months ago when I first got it it had bad links which google had put a penalty against it so losts it value. However the penalty was lift in Sept, the site corresponds to all guidelines and seo work has been done and constantly monitored. the issue I have is sales and visits have not gone up, we are failing fast and running on 2 or 3 sales a month isn't enough to cover any sort of cost let alone wages. hence my question can the cms have anything to do with it? Im at a loss and go grey any help or advice would be great. thanks in advance. Technical SEO | | TeamacPaints0
- 
		
		
		
		
		
		Best Practice on 301 Redirect - Images
 We have two sites that sell the same products. We have decided to retire one of the sites as we'd like to focus on one property. I know best practice is to redirect apples to apples, which in our case is easily done since the sites sold the same thing. www.SiteABC.com/ProductA can be redirected to www.SiteXYZ.com/ProductA. My question is how far does that thinking go regarding images? Each product has a main product page, of course, and then up to 6 images in some cases. Is it necessary to redirect www.SiteABC.com/ProductA-Image1.jpg to www.SiteXYZ.com/ProductA-Image1.jpg? Or can they all be redirected to just the product page? Technical SEO | | Natitude0
- 
		
		
		
		
		
		Speed benefits from loading images from a subdomain
 I have read that loading images from a subdomain of your site instead of the main domain will give you speed benefits on load time. Has anyone actually seen that to be the case? Thanks! Technical SEO | | Gordian0
- 
		
		
		
		
		
		URL query strings and canonical tag
 Hi, I have recently been getting my comparison website redesigned and developed onto wordpress and the site is now 90% complete. Part of the redesign has meant that there are now dynamic urls in the format: http://www.mywebsite.com/10-pounds-productss/?display=cost&value=10 I have other pages similar to this but with different content for the different price ranges and these are linked to from the menus: http://www.mywebsite.com/20-pounds-products/?display=cost&value=20 Now my questions are: 1. I am using Joost's All-in-one SEO plugin and this adds a canonical tag to the page that is pointing to http://www.mywebsite.com/10-pounds-products/ which is the permalink. Is this OK as it is or should i change this to http://www.mywebsite.com/10-pounds-products/?display=cost&value=10 2. Which URL will get indexed, what gets shown as the display URL in the SERPs and what page will users land on? I'm a bit confused so apologies if these seem like silly questions. Thanks Technical SEO | | bizarro10000
- 
		
		
		
		
		
		How to push down outdated images in Google image search
 When you do a Google image search for one of my client's products, you see a lot of first-generation hardware (the product is now in its third generation). The client wants to know what they can do to push those images down so that current product images rise to the top. FYI: the client's own image files on their site aren't very well optimized with keywords. My thinking is to have the client optimize their own images and the ones they give to the media with relevant keywords in file names, alt text, etc. Eventually, this should help push down the outdated images is my thinking. Any other suggestions? Thanks so much. Technical SEO | | jimmartin_zoho.com0
 
			
		 
			
		 
			
		 
					
				 
					
				 
					
				 
					
				 
					
				