Alt Tag vs Alt Attribute

Updated reading time

The ‘alt tag’ vs ‘alt attribute’ war has been a long proven one. Even Wikipedia’s gathered some sources to properly explain the misconception of ‘alt tag’.

Why do people say ‘Alt tag’?

The idea of using the term ‘alt tag’ is most likely a bandwagon fallacy that followed suit and has not been brought to much needed attention.

It is a lot easier to say ‘alt tag’ than its correct usage ‘alt attribute’, although we can go meet halfway and keep it short by using ‘alt text’.

In fact, using ‘alt text’ will be more understandable without sounding too pedantic.

So to be on the safe zone ‘alt text’ is a quick way of paving the way to a proper usage of the term ‘alt attribute’.

Why should I not say ‘Alt tag’?

On the web or through web development, the term ‘tag’ means anything enclosed in < and >. We can even create our own tag called <sumnermic> the ‘sumnermic tag’. Yeah, doesn’t sound like the most descriptive of tags?

These tags are found in HTML — the markup language of the web.

Now, when we say ‘attribute’, we mean the alt found within the ‘img tag’ e.g.:

<img alt="hello">

Breakdown of the example above ^^:

tag = <img>
attribute = alt

If you like, we can find out a bonus that "hello" is called the ‘value’ of ‘alt’; but that’s not the most important thing right now.

What’s important is that we now know that ‘alt’ is an attribute.

Is it still okay to say ‘Alt tag’?

Answer: no.

We know it’s wrong since Day 1 to say ‘alt tag’.

But gladly you’ve found this article and get to spread the message that we need to pave the way to realising the mistake made, and the lesson learned.

Anyways, we can still say ‘alt text’. That’s fine and cheerful as compared to the formal one ‘alt attribute’.

For formality

Yes, we can go onto meetings with our clients and say that they’ve got ‘alt attributes’ that need looking into.

Related:  How to 301 redirect Joomla htaccess with multiple query parameters

So a good sentence to memorise would be:

We’ve found that you have 75 missing alt attributes which need addressing across your website.

Sounds professional, right?

That shouldn’t be too much of a tongue twister though, as the phrase ‘alt text’ might sound like ‘all text’ or if we go way further — ‘Caltech’.

For avoiding the flawed concept

You know you’ve done your job when you see your clients use the term ‘alt attributes’ in their email, as they thank you for the wonderful and professional meeting they’ve recently attended with you, with regards to website work + the subliminal ‘paving the way for the “alt attribute”’.

It’s a day well done for both you and the client as you pass on your knowledge to them.

And they pass on the torch of ‘alt attribute’ to their colleagues at work!

Closing remarks

The right way to go will be to use ‘alt text’ or in a professional sense to say ‘alt attribute’.

Further reading

If you’re into psychology and wish to find out more on this ‘bandwagon fallacy’, among others, I’ve found a great article on ‘Useful Mental Models’ as curated by Gabriel Weinberg CEO of DuckDuckGo.

If you’re into web development you might want to look at your list of HTML fundamentals again, to refresh your knowledge towards tags, values, and elements. Sorry, there was one more that I missed out in this article: ‘elements‘. These are a pair of opening and closing tags, defined as a whole. So the ‘H1 element’ means the whole thing: <h1>Hello</h1>.

If you’re dealing with multiple windows side-by-side, I’ve found a good resource/tool to use called Hammerspoon. It’s open-source for all you devs out there!
I recommend Miro Mannino’s Hammerspoon config since it uses the hyperkey (cmd + alt + ctrl) shortcut on Mac.