Armstrong Websites

Articles · Website content

How to write alt text for website photos

By Armstrong Websites. Published . Updated .

Alt text is a short written description of a photo on your website. To write it, say what the photo shows in one plain sentence, the way you would describe it to someone over the phone. Leave out “image of” and “photo of,” and include any words that appear in the picture.

Visitors who can see the photo never see the alt text. It sits in the code of the page. Other visitors depend on it.

Who alt text is for

People who use screen readers. A screen reader is a program that reads a web page out loud for people who are blind or have low vision. When it reaches a photo, it reads the alt text. With no alt text, it may skip the photo or read out the file name, such as “IMG 4471.”

People whose photos do not load. On a weak connection, a photo may fail to appear. Most browsers show the alt text in its place.

Search engines. Google reads alt text to help it understand what a photo shows. Good alt text can help your photos appear in image search results.

Write for the first group. If the description helps a person who cannot see the photo, it will serve the other two as well.

How to write it

Ask one question: if this photo were gone, what would the visitor miss? Write that.

Follow these rules:

  • Describe what is there. Name the main subject and what it is doing or where it is.
  • Be specific. “Cedar deck with glass railing behind a two-story house” is better than “deck.”
  • Keep it short. One sentence is enough for most photos. Aim for about 125 characters or fewer as plain guidance.
  • Skip “image of” and “photo of.” The screen reader already announces that it is an image.
  • End with a period. The screen reader pauses, which makes the page easier to follow.
  • Match the page. Mention the detail that matters for this page. On a page about railings, describe the railing.

Examples for local businesses

Here are weak and strong versions for the same photos.

A contractor’s project photo

  • Weak: “deck”
  • Strong: “New cedar deck with built-in bench and black metal railing.”

A cafe’s food photo

  • Weak: “food”
  • Strong: “Breakfast sandwich with egg, cheddar, and bacon on a toasted bun, beside a cup of coffee.”

A farm stand photo

  • Weak: “IMG_2210”
  • Strong: “Wooden farm stand table with baskets of tomatoes, peppers, and sweet corn.”

A salon team photo

  • Weak: “team”
  • Strong: “Three stylists standing at the front desk of the salon.” If the page names them, add the names in order, left to right.

A storefront photo

  • Weak: “our shop”
  • Strong: “Front of the shop, a red brick building with a green awning and a bench by the door.”

Describe only what is in the photo. Do not add claims the photo does not show, such as “award-winning deck.”

When the photo has words in it

If a photo or graphic contains words that matter, put those words in the alt text. A screen reader cannot read text that is part of a picture.

For a graphic that says “Closed Monday, October 12,” the alt text is “Closed Monday, October 12.” For a logo, the alt text is the business name, such as “Armstrong Websites.” Do not add the word “logo” unless it helps.

For a poster with a lot of text, such as a menu or a price list saved as an image, alt text is not enough. Type the full text on the page as real text. Real text is easier for everyone to read on a phone, and Google can read it too.

When to leave alt text empty

Some images carry no information. A decorative line, a background pattern, or a stock photo used only to fill space adds nothing for a screen reader user. Describing it wastes their time.

For these, leave the alt text empty. In the code this is written as alt="", which tells the screen reader to skip the image. Some website builders have a checkbox to mark an image as decorative. Others treat an empty field this way, and some fill the gap with the file name or caption instead. Check your builder’s help pages to see how it handles an empty field.

When a photo is also a link, the alt text has a different job. It tells the visitor where the link goes.

A photo of a kitchen that links to your renovations page needs alt text such as “Kitchen renovations.” A Facebook icon that links to your page needs “Facebook,” or “Our Facebook page.” An icon of an envelope that opens an email needs “Email us.”

A linked image with no alt text is a link with no name. A screen reader user hears only “link” and has to guess.

Do not stuff keywords

Some guides say to pack alt text with search phrases. A line such as “plumber Armstrong plumbing Vernon best plumber Enderby drain cleaning” helps nobody. A screen reader user has to listen to all of it, and Google may treat it as spam.

Use a keyword only when it is a true part of the description. “Plumber replacing a hot water tank in a basement” is honest and includes the service. What are keywords and how to find the ones customers use explains where keywords belong.

Where to add alt text in your website builder

Every common builder has a field for alt text. The labels change from time to time, so look for the words “alt text,” “alternative text,” or “image description.”

WordPress. Open the Media Library and select a photo. Fill in the field labeled Alternative Text. You can also set it in the image block’s settings while you edit a page.

Squarespace. Open the image block’s editor and look for the alt text field in its content settings.

Shopify. Open a product, select a product photo, and choose the option to add alt text.

Alt text is different from a caption. A caption shows on the page under the photo for everyone. Alt text is hidden and replaces the photo for those who cannot see it. A photo can have both.

Check the photos already on your site

Most older sites have photos with no alt text. Work through them in order of importance.

  1. Start with the homepage, then your service or product pages, then the rest.
  2. On each page, open each photo’s settings and read the alt text field.
  3. Fill in the empty ones. Rewrite any that are file names or single words.
  4. Run a free checker such as WAVE on the page. It flags images with missing alt text.

A checker can tell you alt text is present. It cannot tell you whether the text is good. Read each one yourself.

Alt text is one part of making a site usable by everyone. What is website accessibility and how to start covers the rest.

If you would like someone to go through your site’s photos with you, get in touch through the contact page.

Ready when you are

Book a coffee