ALT Tags Best Practices for Images
What are ALT attributes?
ALT attributes, otherwise known as ALT tags or ALT text, are beneficial to both the user experience and for Search Engine Optimization across websites.
In Terms of Search Engine Optimization
ALT attributes can be a valuable resource for driving traffic to your website. This text can help Google better understand what kind of content is on a page, in addition to returning the image as a result from a relevant query. Including ALT attributes offers an opportunity to describe what the image is or about, and whether or not it has a function. Your focus keyword(s) for any given page can and should also be included within ALT text, as long as it’s relevant to the surrounding content and can be included within a phrase.
Google has written about the importance of ALT tags in recent years, and it should be as descriptive yet concise as possible.
SEO Expert Yoast offers a good analogy:
“if you have an image that’s used as a button to buy product X, the alt text would say: “button to buy product X.”
If a particular image is not related to a call to action, it’s acceptable and encouraged to include a detailed, long-tail description of the image. Instead of repeating a keyword several times, include your target keyword within a sentence of ALT text.
For example, if I’m writing about fishing for Sailfish in South Florida and I included a picture of a Sailfish, my ALT text would be: “7 foot long Sailfish caught in South Florida near Boca Raton.” In this example, I’m including a variation of my focus keyword, which would be “sailfish in south florida.”
In addition to writing good ALT text, it’s important to keep it as relevant as possible. That means placing images around content that is relevant to the image. This relevance should be reinforced by including detailed title tags AND captions with pictures you include on any given page.
Lastly, if something being depicted on an image is important to the surrounding content, include relevant keywords in ALT tags that may aid users in finding that content. For example, if you’re describing and ultimately trying to sell a product on a particular page, be sure to include an image with the name of that product in addition to its product ID in the ALT text so it can be located more easily.
Quick check list for optimizing your image tags:
- Use descriptive yet easy to read phrases or sentences
- Include your focus keyword and variations of your focus keyword(s) within alt and title text
- Consider the placement of your image and the text surrounding it
- Do not overuse or repeat the same keywords or image tags excessively (This is called keyword stuffing and can be detrimental to your page rank. In the worst cases, Google marks your page as spam)
- Do not incorporate ALT or title text on pages or around content that is not relevant to the image
Title tags are important to include as they also offer a better user experience and potentially improved SEO. Title Tags can be seen when hovering over an image with your cursor. They also help Google determine the context of a particular image, in addition to what the image and surrounding content on any given page may be about. Note that it is a best practice to include optimized Title Tags, and it doesn’t hurt to include the same Title & ALT text on the same image. Currently, it appears that Google gives more weight to ALT attributes over the title tag of an image, but title tags should still be included.
In recent years, Google, and other search engines, have been giving more weight to image file names.
“The filename can give Google clues about the subject matter of the image. Try to make your filename a good description of the subject matter of the image. For example, my-new-black-kitten.jpg is a lot more informative than IMG00023.JPG. Descriptive filenames can also be useful to users: If we’re unable to find suitable text in the page on which we found the image, we’ll use the filename as the image’s snippet in our search results.”
Including Image Names & Locations in a Sitemap
In order to ensure Google has access to images across a website, it doesn’t hurt to incorporate their names and locations within a sitemap. A separate sitemap dedicated to images can be submitted to the search engine using Google Webmaster Tools. Or, you can use one of your current sitemaps and incorporate the appropriate code. A sample image-based sitemap entry is seen below:
<?xml version=”1.0″ encoding=”UTF-8″?>
XML Namespace: xmlns=http://www.google.com/schemas/sitemap-image/1.1
Image tag definitions
|<image:image>||Yes||Encloses all information about a single image. Each <url> tag can contain up to 1,000 <image:image> tags.|
|<image:loc>||Yes||The URL of the image.
In some cases, the image URL may not be on the same domain as your main site. This is fine, as long as both domains are verified in Search Console. If, for example, you use a content delivery network such as Google Sites to host your images, make sure that the hosting site is verified in Search Console. In addition, make sure that your robots.txt file doesn’t disallow the crawling of any content you want indexed.
|<image:caption>||Optional||The caption of the image.|
|<image:geo_location>||Optional||The geographic location of the image. For example,<image:geo_location>Limerick, Ireland</image:geo_location>.|
|<image:title>||Optional||The title of the image.|
|<image:license>||Optional||A URL to the license of the image.|