New Exclusive Deal:

Up To 75% OFF a New Website

04

:

02

:

40

:

31

Zyro encyclopedia

Learn about online business

Zyro Glossary eCommerce

Alt Tag

What is an alt tag?

An alt tag us an attribute applied to image tags in the HTML code for a web page. They serve as a description of the content of the image and are crucial for search engine optimization and web accessibility. 

You might also hear alt tags referred to as “alt attributes” or “alt descriptions”, but these are functionally the same. 

When you look in the HTML code of a page, an image alt tag would appear like this:

<img src=”chair.png” alt=”wooden armchair with red cushion” />

Though alt text is usually invisible to regular users (who would only see the image), there are three main purposes that alt tags serve:

  • Helping robots interpret web pages. The robots which crawl web pages for search engines cannot interpret images by looking at them. Instead, they require an alt tag to describe image content to them. 

It is this purpose we’ll be exploring further in this glossary entry, since it is the most relevant to website building, SEO, and eCommerce. 

  • Aiding the visually impaired. For internet users who suffer from visual impairments, or otherwise cannot see pictures on web pages, alt tags offer a solution. 

Software that reads web pages aloud to visually impaired users can describe the image for the user by reading the alt text. 

  • Giving information when images don’t load. An alt attribute can act as a backup if a web page fails to load on a browser, or a visitor is using a text-only browser. 

Instead of displaying the image, the web page can display text describing the image, so no meaning is lost to the user. 

Why are alt tags important for SEO?

We mentioned before that alt images texts are key to a successful SEO strategy, and this is true for a combination of reasons:

  • Context / relevance. Since SEO crawlers won’t recognize everything in an image, and certainly won’t understand the context or relevance of image content, using an alt tag helps them better understand what’s in the image and what the image means in context. 
  • Indexing. Want your page to rank for a specific keyword related to your image? Using an alt tag indicates to search engines not only what’s in the image, but what the content of your page is about, helping them index it more efficiently. This helps get you found in search results.
  • User experience. Search engine ranking is particularly influenced by bounce rate and other UX indicators. By displaying alt text for visually impaired users or if an image fails, this will reflect in a better UX and higher rankings.  

How to write an alt tag

Now that you have a good handle on what an alt tag for images is and why you should be using them, it’s time to have a look at how they work in practice. 

While the format of your alt text for images should be the same regardless of how you choose to build your website (we’ll talk about alt text best practice in a minute), how you enter them into your HTML code will differ depending on how you’re building your site. 

HTML code 

If you’re coding a website from scratch, are using an HTML template, or have access to the HTML code for some other reason, it’s simple to add alt tags to your images. 

When you have access to the HTML code of the website, you can just add the alt tag by using the format described in the first section above.

Content management systems

If you’re using a CMS, like WordPress, you’ll likely have a couple of options when it comes to adding image alt attributes. 

Usually, you can use an image uploader which will have a text box for entering your alt tags. Alternatively, you should also be able to access a page’s HTML code to enter them manually, if you prefer. 

Website builders 

If you’re using a website builder, chances are you won’t have direct access to your page’s HTML code. Instead, you’ll need to use whichever mechanism the builder offers for editing alt text. 

If you’re using Zyro, for example, you’ll have to select the image, go into the image’s settings, and under the SEO tab, you’ll find the Alt text field. 

Best practices for good alt tags

Since image alt texts have such a big hand in SEO, it’ll come as no surprise that writing them requires an element of finesse. 

While you should certainly be thinking about search keywords, these are not the only important aspect of crafting effective alt tags. 

Make the alt text relevant to your web page

Your images are (probably) not the only content on any given web page. Instead, it will exist within the context of other text, titles, and images. 

Search engine bots will look at everything together before deciding how to index a page and its images. 

To help search engines correctly understand what the overall message of your page is, it’s important that the text in your images’ tags relates to the content elsewhere on our page. 

This will ensure that the traffic you get to your website is relevant, and looking for the content you have on offer. This, in turn, will decrease your bounce rate and improve your SEO rankings further. 

Keep the alt text short but descriptive

It’s worth remembering that you’re writing alt text for humans as much as search engine bots. That’s why it’s important to make sure that, while you’re as concise as possible, you also describe the content of images in a comprehensible way. 

A clear description will also help the image get found in image searches, where users might be searching for a very specific image. 

Be careful though, and don’t overdo it with your descriptions. Search engines like Google prefer indexing shorter alt text. This means that if your alt tags are descriptive but snappy, you’ve got the best chance of getting them properly indexed. 

Use your focus keywords for SEO

Keywords are the cornerstone of SEO, and image alt texts offer the perfect opportunity to introduce more of your target keywords onto your web pages. 

Keywords are the main indicator to search engines what your page is about, and so a high density of related keywords tells a search engine what the purpose and focus of your page is. 

While you should focus on ensuring that your image alt texts are descriptive and concise, if it’s appropriate, you should include one or more keywords. 

Don’t stuff your alt tags with SEO keywords

Anyone with even the vaguest knowledge of modern SEO practices will be able to tell you that the number one cardinal sin of writing SEO content is keyword stuffing. Well, the exact same is true for an image SEO alt attribute. 

Keyword stuffing is basically what it sounds like; cramming too many keywords into too little space in the hope of tricking search engines into giving the page a better rank. 

Turns out search engines are too smart to fall for that, and today it’s just plain bad SEO practice. 

Not only will keyword stuffing not achieve any goal (because alt tags are not that important unless your site is very image-driven) but you’ll run the risk of getting penalized by Google.

Written by

Author avatar

Duncan

Duncan is obsessed with making website building and eCommerce accessible to everyone. He explains the best tools and the latest digital marketing trends in ways that are clear and engaging. His focus is on supporting the sustainable growth of small to medium-sized enterprises. When not writing, he enjoys deep sea fishing and endurance cycling.

Launch your online store. It’s quick and easy.

Get started