Websites & SEO

What is alt text?

Alt text (alternative text) is a short description added to an image in the HTML. Screen readers read it aloud for blind and low-vision users, and it is shown if the image fails to load. Search engines also use it to understand images.

How to write it

Describe what the image shows and why it is there, in a sentence or less: Dentist explaining an X-ray to a patient, not image123 or dentist dental clinic best dentist. Do not start with picture of. If the image contains important text, include that text.

When to leave it empty

Purely decorative images, such as background shapes, should have an empty alt attribute (alt="") so screen readers skip them. Icons next to a text label also usually need no description, because the label already says it.

Questions, answered

It helps search engines understand images and can help image search, but its main purpose is accessibility. Do not stuff it with keywords.

Usually under about 125 characters. Complex images such as charts need a longer description nearby on the page.

By the Stegnor team · Updated