When search engines use crawlers to crawl and index the pages on your website, they are able to read and understand most of the written text and code on the page. However as these crawlers are essentially just programmes created by search engines to crawl and index pages, they struggle to look at images and understand what their context is to the content, this is where alt tags or ‘alt text’ as it is also commonly referred to, comes in handy.
Alt tags are essential for helping search engines to understand what the images on your page are and how they’re related to the content that’s on your page. But that’s not the only reason why they’re a vital part of your on-page SEO. If you’d like to get a better understanding of what alt tags are, why they’re relevant to your page and the best practices on how to implement them, then you’ll want to carry on reading.
What is an alt tag?
An alt tag or an alt attribute is part of the HTML which is given to an image which provides search engines with a description of what the image contains.
What do they do?
Search engine crawlers have problems interpreting images; therefore, alt tags are able to provide crawlers with a description of the image that is on the page.
In addition to helping search engine crawlers interpret the images that are on your pages, alt attributes are also particularly helpful to the users on your site who may be visually impaired. Visually impaired users may use what is called a ‘screen reader’ or alternatively another piece of software to help their accessibility to webpages. These tools are able to read aloud what the information is on the page including the descriptions of the images.
Why are they important?
Asides from helping search engines to interpret the images that are on your page and helping visually impaired users to understand a description of your images, alt tags are also helpful for SEO purposes as well.
This is because when used correctly they can help your images appear in the image search for that particular search query or keyword. For instance, if you have a picture of a beautiful bespoke birthday cake that you have created for your business, then it can help to provide an optimised alt tag to that image to ensure that you appear in the search results with your picture for the term ‘birthday cake’, which will improve your visibility and in turn, your sales.
Where are they located?
Alt tags are located within the image tag or image attribute on your page, which should look something like this:
<img src="thisisyourimage.jpg" alt="your alt tag/text goes here"/>
How to use Alt tags – Best practices for SEO
Now you understand how necessary alt attributes can be, your next step is to create perfectly optimised alt tags for both you and your users to get the most benefit out of them. In the following section, we’ve comprised three easy things you need to remember when creating alt tags for your images.
1. Keep it short and to the point
Ensure that your alt tag descriptions of your images aren’t too long and long-winded.
<img src="birthdaycake.jpg" alt="dark chocolate sponge birthday cake with pink strawberry buttercream icing and light baby blue and white striped candles"/>
Instead, you should make sure that you are able to strike a balance between images describing your image well but also being to the point. Be sure to describe the image, and it’s context to your page.
<img src="birthdaycake.jpg" alt="chocolate sponge birthday cake with pink buttercream icing and blue candles"/>
2. Describe the image efficiently
The easiest mistake to make with alt tags is not to describe the image well enough. For example, if we use our previous example of the birthday cake, you could be tempted to create an alt tag which looks like this:
<img src="birthdaycake.jpg" alt="chocolate birthday cake"/>
Which you might think sufficiently describes the image enough, but you’d be wrong. Instead, try to be more appealing and descriptive of the image:
<img src="birthdaycake.jpg" alt="chocolate sponge cake with pink icing and blue candles"/>
3. Include your target keyword but don’t keyword stuff
If you’ve got images that are specifically related to your targeted keywords, then it helps to include them in your alt description to show search engine crawlers the image’s relevance to the content on your page. However, it is important not to ‘keyword stuff’ these alt tags, as search engines tend to see these alt tags as spam and will ignore them.
<img src="birthdaycake.jpg" alt="sponge cake birthday cake celebration celebration cake happy birthday cake"/>
Try to include your keyword once to one or two of the images that are on your page, instead of putting your keyword multiple times in the alt tag to every image on your page. Instead, try to include the keyword or terms related to your keyword in one or two of the alt text in which the photo is related to the keyword.
<img src="birthdaycake.jpg" alt="chocolate sponge birthday cake with pink icing and blue candles"/>
The better you optimise the images on your page, the more beneficial it will be for search engine crawlers who are crawling and indexing your pages. Better tuned alt tags help your pictures to appear in the image search results for increased visibility and provide accurate descriptions of your images for visually impaired users, ensuring they get a better user experience from your page.