---
title: "Discussion on \"Tips For Writing Good Alt Text In HTML\" | Hashnode"
description: "Discussion on \"Tips For Writing Good Alt Text In HTML\". Originally published on adiati.com.\nHello Fellow Codenewbies 👋,\nSometimes we forget or ignore writing an alt text.One of the reasons I often hear is that we don't know what to write, skip it for late"
url: "https://hashnode.com/posts/tips-for-writing-good-alt-text-in-html/60a9952b20d1f45ceb7ee979"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Tips For Writing Good Alt Text In HTML](https://adiatiayu.hashnode.dev/tips-for-writing-good-alt-text-in-html?utm_source=hashnode&utm_medium=feed)

Originally published on adiati.com. Hello Fellow Codenewbies 👋, Sometimes we forget or ignore writing an alt text.One of the reasons I often hear is that we don't know what to write, skip it for late

May 22, 2021 · 4 min read · adiatiayu.hashnode.dev  
Updated Sep 10  
Read the article

-   [#html5](https://hashnode.com/tag/html5)
-   [#accessibility](https://hashnode.com/tag/accessibility)
-   [#seo](https://hashnode.com/tag/seo)
-   [#tips](https://hashnode.com/tag/tips)
-   [#codenewbies](https://hashnode.com/tag/codenewbies)

## Written by

[Ayu Adiati](https://hashnode.com/@adiatiayu)

@adiatiayu · The Netherlands

  
[View profile](https://hashnode.com/@adiatiayu)

Ayu is a tech blogger, open source contributor &amp; maintainer, and tech community enthusiast based in the Netherlands. She loves photography and iced coffee!

## Responses 2

Markdown supported · ⌘↵ to post

[Margaret Goldman](https://hashnode.com/@margaret500)

[May 24, 2021](https://hashnode.com/posts/tips-for-writing-good-alt-text-in-html/60a9952b20d1f45ceb7ee979/comment/60ab5c7d5379f65d10b62ae0)

Great tips, [Ayu Adiati](https://hashnode.com/@ayuadiati). 🙌

[Ayu Adiati](https://hashnode.com/@adiatiayu)

[May 26, 2021](https://hashnode.com/posts/tips-for-writing-good-alt-text-in-html/60a9952b20d1f45ceb7ee979/comment/60ab5c7d5379f65d10b62ae0#reply-60aea9712ef63a174032d6df)

Thank you for reading, [Margaret Goldman](https://hashnode.com/@margaret500) 😀

[Daniel Cobo](https://hashnode.com/@cobo)

[May 23, 2021](https://hashnode.com/posts/tips-for-writing-good-alt-text-in-html/60a9952b20d1f45ceb7ee979/comment/60a9f6eb20d1f45ceb7ef0dc)

🙅‍♂️Just say no to this:

> Another alternative is to leave the alt text empty. Most screen readers will skip reading an image with empty alt text.

There is no alternative, either it's content (and deserves alt) or style (and should be in CSS).

Although I do like that you included what happens when there's no alt text.

[Ayu Adiati](https://hashnode.com/@adiatiayu)

[May 23, 2021](https://hashnode.com/posts/tips-for-writing-good-alt-text-in-html/60a9952b20d1f45ceb7ee979/comment/60a9f6eb20d1f45ceb7ef0dc#reply-60aa3d1b5379f65d10b61001)

Hi Daniel,

Thank you for the feedback 😊

I agree that images should have [alt text](https://www.w3.org/WAI/WCAG21/quickref/?currentsidebar=%23col_overview&versions=2.1&showtechniques=111#text-alternatives). And whenever images are presented for [pure decoration](https://www.w3.org/WAI/WCAG21/Understanding/non-text-content#dfn-pure-decoration) purposes, the best way is to use CSS to add those images.

However, when using CSS is not an option, another alternative is to have _null_ alt text. That means, we still provide the alt attribute, but with empty text to be ignored by the Assistive Technology such as screen readers. [This technique](https://www.w3.org/WAI/WCAG21/Techniques/html/H67.html) still complies with WCAG 2.1.

Thank you for reading my post 😊

[Daniel Cobo](https://hashnode.com/@cobo)

[May 24, 2021](https://hashnode.com/posts/tips-for-writing-good-alt-text-in-html/60a9952b20d1f45ceb7ee979/comment/60a9f6eb20d1f45ceb7ef0dc#reply-60ab73c261f5f47b572b5618)

[Ayu Adiati](https://hashnode.com/@ayuadiati) I get that realistically there may be some reason why no alt is there and the dev has no control over it (perhaps it's a CMS and the user skips to add a description..)

I believe in that case the dev should advocate to make it a mandatory field and explain the importance to the end-user

As even that may not be possible in some organisations I do appreciate that you consider what may be called a progressive enhancement approach to accessibility

[Ayu Adiati](https://hashnode.com/@adiatiayu)

[May 26, 2021](https://hashnode.com/posts/tips-for-writing-good-alt-text-in-html/60a9952b20d1f45ceb7ee979/comment/60a9f6eb20d1f45ceb7ef0dc#reply-60aea9a15c02001765cf3586)

Good advice, [Daniel Cobo](https://hashnode.com/@cobo). Thank you 🙂
