Understanding ALT Attributes for SEO

What is an ALT Attribute?

An ALT attribute (also called an ALT text or, incorrectly, ALT tag) is an obligatory component of an image tag <img>. It’s information that you should use in your website’s HTML code to describe what an image is about.

If your website’s visitor is using a screen reader, has disabled all images, or is visually impaired, he or she will be able to understand what the image represents thanks to this attribute.

ALT attributes are also crucial for search engine crawlers to understand what your website is about and whether or not it’s relevant. Crawlers do not understand images the way people do; when they encounter an image, they can only read the site’s HTML code.

See this example below.

what you see:


what a robot sees:

<img src=”picture.jpg” alt=”Positionly logo”>

Why are ALT Attributes Important for SEO?

By using ALT attributes, you make it easier for the crawlers to index your site and place it higher in the search engines. The higher you are in the SERPs, the more visitors come to your site.

Effective ALT attributes will have a positive impact on your SEO. Not only will you be making your website more accessible for visitors, but your visibility in image results will also increase. Your overall visibility will be higher; which is great for your bottom line!

How do I Write an Effective ALT Attribute?

As part of an image tag, ALT attributes are used along with the source attribute . An exemplary code for the image attribute should look similar to the one below:

<img src=”http://yourdomain.com/photo.jpg” alt=”the description of the photo”/>

Between the two attributes, you should insert a space. The value of those attributes should be written in double quotation marks.

A correctly written ALT attribute needs to be:

  • short, but descriptive (50 characters limit)
  • relevant to the image and the content on the website
  • simple and easy to understand
  • include keywords (but omit keyword stuffing)

An ALT attribute is required for an image tag. According to the W3C standards, every image should have an ALT attribute, even if it’s just a decorative element. If it is a decorative element, simply leave the value as an empty string.


If you have a lot of images to add ALT attributes to, do the following:

  • Talk to your photographer and ask him to write descriptions to the images instead of naming them in a way that doesn’t say anything, e.g. “red shoes for women.jpg” instead of “DCIM123.jpg”.
  • Automate the process of inserting ALT attributes to the images with the help of your developer – ask him to write a script that enables that.
  • If you’re using a CMS like WordPress – inserting an ALT attribute in an image tag is really easy! After uploading an image, go to “Alternative Text” and insert your description there.
  • Use Positionly’s On-Page Optimization tool to know exactly which images are missing ALT attributes on a page.