Skip to content

Decorative images and empty alt text

Reviewed on 16 November 2026

If a picture adds nothing a visitor needs, leave its alt text empty on purpose. You write it as alt="", with nothing between the quote marks.

That's different from leaving the attribute out. The two look alike in your editor and behave very differently for a listener.

What counts as decorative

Section508.gov, a US government site, calls an image decorative when it holds no information the reader needs to follow the main content. It's pure decoration, or used only for visual formatting.1 WebAIM, an accessibility group, adds a third condition. A decorative image also has no function, which means it isn't a link.2

Typical examples are divider lines, spacers, background swirls, and a stock photo dropped in only to fill space. Section508.gov says spacers and similar structural images are decorative.1

Empty isn't the same as missing

When there's no alt attribute at all, a screen reader may fall back on something worse. MDN says many screen readers "announce the whole image URL if no alt is provided".3 Section508.gov warns that a screen reader may read the file name rather than skip the image.1

An empty alt tells the software to move on. MDN says it "indicates that this image is not a key part of the content", and that non-visual browsers may omit it.4 So for decoration, MDN's advice is that "you should include an empty alt in your img elements".3

A quick test for decorative imagesIs the picture a link or button?If not, would deleting it lose anything?If deleting it loses nothing, alt is emptyIf nearby text already gives its meaning, empty alt may be enough, but check the picture doesn't add something the text doesn't
Questions to ask, in this order, before you settle on empty alt.

Two tests you can use

The first comes from WebAIM: "If the image were deleted, would important content be lost?" If not, it's probably decorative.2

The second is a swap question. If you couldn't use the picture, what would you put in its place? WebAIM says that if the answer is nothing, then an empty alt is probably enough.2

A stock photo that's only there for looks

This is the common trap. WebAIM's example is a handshake photo beside a paragraph about customer service. Writing "Handshake" or a long line about business people shaking hands gives listeners noise. Worse is stuffing in a marketing line like "We guarantee our professional services", which WebAIM calls a mistake too common on the web. The alt is meant for the image, and nothing else.2

Section508.gov makes a similar point about a person typing on a laptop. If the photo is only decoration, describing it in alt text is unhelpful.1

Better still: take it out of the page content

If a picture is only decoration, WebAIM suggests putting it in as a CSS background image instead. Then it needs no alt text at all, and it's removed from the page's structure.2 CSS is the code that controls how a page looks. If you use a website builder, you may find this as a "background image" setting on a section. Check your builder's own help pages.

One catch. Section508.gov says that if a decorative image is meant to be skipped, you should confirm during testing that it is.1 The page on checking your pages shows ways to do that.

When not to leave it empty

An empty alt is wrong if the picture carries meaning. If it's a photo the page depends on, write alt text, as in the guide to ordinary photos. If it's a link or button, it needs words too. The page on logos and image links explains.

There's a middle case. WebAIM says that if an image's content is already given in the surrounding text, then an empty alt "may be all that's needed". Be honest about whether the text really covers it.2

Sources used

  1. Authoring Meaningful Alternative Text, Section508.gov (US General Services Administration)
  2. WebAIM: Alternative Text, WebAIM
  3. HTML accessibility, MDN Web Docs (Mozilla)
  4. <img>: The Image Embed element, MDN Web Docs (Mozilla)