What Is the alt Attribute? SEO Benefits, Best Practices, and Examples Explained
Published:
Last Updated:
Category: SEO & Content
Authors: Shusaku Yosa
Published:
Last Updated:
Category: SEO & Content
Authors: Shusaku Yosa

The "alt" notation you see when writing HTML for images. Many people include it without quite knowing what it is for, whether it helps SEO, or how to use it properly. The alt attribute is an important element for correctly conveying the content of an image to search engines and users. This article clearly explains what the alt attribute is, from the basics through its SEO benefits, the correct way to write it with examples, and common mistakes.
The alt attribute is text information written in an HTML img tag that describes the content of an image. "alt" is short for "alternative," and as the name suggests, it refers to descriptive text that stands in for the image itself. It plays the role of being displayed in place of the image when the image cannot be shown, and of conveying the image's content to search engines and screen-reader software.
The alt attribute is written inside the img tag in the form alt="description of the image." For example, for a product photo of a blue sneaker, you would write something like alt="product photo of a blue running shoe," describing what the image shows in concise text. It is common to write it as a basic element of the img tag alongside the src attribute, which specifies the image's file name or URL.
The alt attribute is useful mainly in the following three situations.
When set appropriately, the alt attribute also works in your favor for SEO. Because search engines cannot recognize the content of an image the way humans do, they use the alt attribute text as a clue to judge what the image represents. Here we look at the benefits the alt attribute brings to SEO.
In Google Image Search, the alt attribute text is an important element for judging the content of an image. Setting an appropriate alt attribute makes your image more likely to appear to users searching with related keywords, and you can expect traffic via image search. The effect is especially large for visually searchable content such as product images and diagrams.
The alt attribute also helps search engines understand the overall theme and context of a page. When the body content and the image's alt attribute are consistent, it becomes easier to convey to search engines what topic the page covers. This indirectly contributes to evaluation in regular search results as well.
The alt attribute is also an element that improves accessibility (the state in which anyone can access information). Building a site that is easy for all users to use aligns with the user-first approach that Google values. Setting alt attributes carefully is an effort that raises the quality of the site itself, not just something done for SEO.
It is not enough to simply set an alt attribute. To increase its effectiveness, it is important to write it with a few key points in mind.
In the alt attribute, write specifically what the image represents. Rather than vague words like "photo" or "image," aim for a description that conveys the content as it appears, such as "coffee in a white ceramic mug." Whether a person who cannot see the image can picture the content when reading it is a good benchmark for a quality alt attribute.
Including relevant keywords with SEO in mind is effective, but the premise is to use them naturally within a sentence that describes the image's content. Listing keywords or stuffing in words unrelated to the image can instead become a cause of lower evaluation. Aim for a natural sentence that satisfies both "describing the image" and "including keywords."
For images that carry no meaning as content, such as divider lines, backgrounds, and decorative icons, set alt="" (an empty alt attribute). Doing so lets screen readers skip unnecessary images and avoids hindering the user's browsing experience. Rather than omitting the alt attribute itself, it is recommended to write it even when it is empty.
Let's compare specific examples with good and bad versions.
If you set the alt attribute the wrong way, it can fail to deliver SEO benefits and may even work against you. Representative mistakes include putting the same keyword in every image, stuffing in unrelated keywords, and leaving the alt attribute empty for images that actually need a description. The purpose of the alt attribute is always to "accurately convey the content of the image," so avoid uses that stray from that principle.
The alt attribute is alternative text for conveying the content of an image to search engines and users. When set appropriately, it offers benefits on both the SEO and user-experience fronts, including traffic from image search, better understanding of page content, and improved accessibility. The key points are to describe the image's content specifically and concisely, include relevant keywords naturally, and leave decorative images empty. It is not a difficult technique; the steady accumulation of careful descriptions for each image raises the quality and evaluation of your site as a whole.

Internal links in SEO are links that connect pages within a site. They have SEO benefits such as encouraging crawler cra...

Learn how to use Keyword Planner. From how to use it for free with a Google Ads account, to how to check search volume a...

A guide to SEO for Yahoo! Search. Because Yahoo! uses Google's algorithm, the basics are shared, but the search results ...