Alternative Text

Learn what alt text is, why it’s important and how to write it.

What is alt text?

Alternative text—or alt text—is a textual substitute for non-text content in web pages. It is a short, written description of an image that describes the appearance, content and/or function of an image on a page.

Why is alt text important?

Alternative text serves several purposes:

  • Screen readers read the alt text to provide the content and function of the image. This helps users with visual or certain cognitive impairments understand the content and function of the images.
  • Displays in place of an image if the file cannot be loaded.
  • Provides search engine crawlers with image context.

Writing effective alt text.

Describe the image within the context of the page.

  • What is the content conveyed by the image?
  • What information should the user gain from the image?

Do

  • Keep it concise but meaningful—no more than 150 characters. (This is a guideline.)
  • Use correct grammar—capitalize the first letter and end whole sentences with a period.
  • Add alt text to buttons in forms.
  • Describe the function of images used as links.

Don’t

  • Don’t include the words “image of,” “graphic of,” “picture of,” etc., in your alt text.
  • Don’t use text within images.
  • Don’t include the words “link to” on functional images.

Decorative images.

  • Decorative images are images that do not convey any meaning or provide important information.
  • Use null alt text.

Functional images.

  • Images used to initiate actions, link to another page, etc.
  • The alt text should describe the function of the image.

Examples

Overhead view of a blueberry pie with the UB Bulls spirit mark cut out of the top crust.

Poor alt text: pie

Good alt text: Overhead view of a blueberry pie with the UB Bulls spirit mark cut out of the top crust.

Sideview of a student looking into a microscope with bright streaks of light on the left side of the photo.

Poor alt text: researcher

Good alt text: Sideview of a student looking into a microscope with bright streaks of light on the left side of the photo.