An alt tag (alt text or alt attribute) is a piece of text in the HTML code that describes what can be seen in an image. Search engines cannot “see” images the way people do — the alt tag tells Googlebot and other crawlers what the image represents.
Why are alt tags important?
Alt tags serve three purposes:
- SEO — search engines use alt text to index images. Good alt tags help your pages rank higher and make your images discoverable in Google Images.
- Accessibility — visitors who use a screen reader hear the alt text read aloud. Without an alt tag, an image is invisible to them.
- Fallback — if an image fails to load, the browser displays the alt text instead of a blank space.
How do you write a good alt tag?
An effective alt tag is:
- Descriptive — describe what you see: “Red contact form on the homepage” rather than “image1”.
- Concise — keep it under 125 characters. Screen readers truncate longer text.
- Relevant — include a keyword if it fits naturally, but avoid keyword stuffing.
- No “image of” — the browser already knows that. Start directly with the description.
Alt tags in WordPress
In WordPress you set alt text via the media library:
- Click on an image in the Media Library.
- Fill in the Alternative Text field.
- The alt text is automatically added when you place the image in a page or post.
In the Gutenberg block editor you can also set the alt text directly on the Image block via the settings panel on the right.
SEO plugins such as Yoast warn you when images lack alt text, so you never miss one.
Common mistakes
- Empty alt tags — every content image should have an alt tag. Decorative images may have an empty alt (
alt=""). - Keyword stuffing — “WordPress website WordPress agency WordPress design” harms your SEO rather than helping it.
- Too generic — “logo” or “photo” says nothing. Write “WP Agency logo — WordPress agency”.