It’s alt attribute, not alt tag

Ok people, time to get some basic terminology right. I’ve posted about this before, but here goes again: There is no such thing as an alt tag in HTML! It is an attribute which is required for images, and is specified in the img tag that defines an img element.

From the HTML 4.01 specification, 13.8 How to specify alternate text:

alt = text [CS]
For user agents that cannot display images, forms, or applets, this attribute specifies alternate text. The language of the alternate text is specified by the lang attribute.

and

The alt attribute must be specified for the IMG and AREA elements.

Also from the HTML 4.01 specification, this time from 13.2 Including an image: the IMG element:

The IMG element embeds an image in the current document at the location of the element’s definition.

Calling the alt attribute a “tag” has become so common that I don’t really think it’s possible to do much about it. But here’s hoping that this post will point at least some of the people searching for “alt tags” or “alt tag” in the right direction.

Here are my previous posts related to this subject:

And some other people’s similar posts:

Posted on November 7, 2005 in (X)HTML

Comments

  1. Roger, dude, let go of the bone.

    No seriously, it looks like its just one of those unchangeable things and you’re probably fighting a rising tide. We have to remember that to the rest of the world our stuff isn’t as important as it is to us. Most people I know don’t even turn on computers except to email once every week or two. They’re the alt whatters perhaps.

    Communication is a two way thing though and when you’re talking technicalities with someone ‘in the trade’ you can generally hope they talk the lingo. The rest of the world not…

    I’d take a guess and say you’ve either just been on a forum or someone’s been in your office (is it this morning there?). For me its the end of a long unfruitful day…

    Yes its good to reiterate the alt attribute thing on your blog though as its got to be filtering down the hill to some degree.

    Some good coffee is in order though. Cheers.

  2. I know it’s an alt attribute - but the “alt tag” phrase has become so embedded in my brain, it’s difficult to let go. I do try, but it’s difficult to rid myself of 7 years of incorrectness :(

  3. I always correct them when the marketing people use it on customers, but they always look at me as if I smell funny. =/

  4. Umm, seriously, did you miss your morning coffee or something? :P

    In any case, when it comes to spoken languags, common usage defines correctness, not some w3c spec. So, “alt text”, is in fact an acceptably correct term. Just ask Google ;)

    In any case, I don’t think people are going to run into too many troubles finding out about “alt tags”: http://www.google.co.nz/search?hl=en&q=alt%20tag

  5. November 7, 2005 by Roger Johansson (Author comment)

    Hehe sorry if I made a grumpy impression. I just needed to vent a bit. :-)

    Sam: “alt text” is fine, but “alt tag” is not.

    The same goes for “title tag”. When someone is talking about “the title tag”, what do they really mean? The title element? The text that is in the title element? Or do they mean a title attribute?

  6. It’s funny because I think most people know that “alt” is an attribute say “tag” out of habit. I had to stop and re-read the line on Anne’s blog a couple of times until I was like “oh, yeah, of course it’s an attribute, duh!”

    • Are we there yet?
    • No honey, we will NEVER be there

    Nothing wrong with repeating it though, but for I moment I thought my aggregator had gone back in time. :-)

  7. I have noticed a rather abrassive and vigilante type tone to many of your recent posts, I think you should look into yoga or take up kick boxing or something - you need to chill out about these things, human language is full of contradictions and things which logically are wrong but which we all except as right - you have to remember that as long as people know what you are talking about then everything is fine. I haven’t seen a single site that has done , relax mate and just smile on the inside because you know you are right.

  8. ” I haven’t seen a single site that has done here was an example of a made up alt html tag

  9. November 7, 2005 by Roger Johansson (Author comment)

    Sébastien: Nope, we will most likely never get there. But it’s worth a try.

    Jon B: Maybe I’ve been spending too much time over at Joshuaink, enjoying Mr. Oxton’s excellent rants ;-).

  10. Well, when people talk about title tag - they mean the title element of course.

    When they talk about title attribute, they just mean that - the attribute.

  11. …. and lots of people don’t call it title attribute because they don’t seem to know it yet ;-)

  12. Thanks for the prompt Roger, after checking my accessibility page I saw I’d done exactly that, called it a tag rather than attribute.

    I’ve amended it now to say attribute, and also a sentence to promote the correct usage.

    www.broxtowe.ac.uk/home/accessibility

  13. November 7, 2005 by Carrie

    I’ve heard worse in the A+ Course so much so that I wanted to stick my head in a blender and flick the on switch.

    My family have no excuse as I use proper techy terms most of the time, explaining what it means if they start looking at me like I’ve suddenly mutated into a Hydra.

  14. Not to be an ass or anything, but who cares? “Alt Tag”, “Alt Attribute”, “Alt Text”, as long as its used right, its all good.

  15. The idea is still conveyed properly, when you say “alt text” or “alt tag”. “alt attribute” probably is the least meaningful. :)

  16. Does this mean I have to stop calling it the “img attribute”??

    j/k bro.

  17. November 7, 2005 by Roger Johansson (Author comment)

    Dustin: You bet! And never let me catch you talking about “class elements”… ;-).

  18. Roger, did you know that before this post, “Continue reading…” was used only twice in the previous nineteen (19) RSS feeds: “CSS 2.1 selectors, Part 3” and “Macromedia Dreamweaver 8 Review”.

    And, from experience, I know that when you include this “read-this-or-die” phrase, it’s a very important post.

    I knew that I must read this post because of your page URI, page title, the use of “strong emphasis” in the feed text and “Continue reading…”.

    I guess we all have our bête noire Evangelisms. It’s nothing to be ashamed of. Mine’s “Fix copyright dates, you Idiots!”

  19. who cares? “Alt Tag”, “Alt Attribute”, “Alt Text”, as long as its used right, its all good.

    Sometimes I wish I had an XML parser in my brain so that I could return a “Fatal Error” when confronted with approximations.

    But human brains are extremely powerful language soup parsers.

    And also we must not discount the pleasures of a good rant.

  20. I have to plead guilty on this one, as it’s a viral habit that keeps getting spread to designers and developers.

    But it’s also an indication of the sloppiness of language that has been increasing lately.

    On the one hand, it can seem a bit anal, however, language is man’s method of communicating with each other.

    While we can understand a LOT of variance in the language, we should always strive to be as accurate as possible.

    Semantics is a very practical concept, and as such, should follow practical guidelines.

    Rant on.

  21. Heheheh I feel your pain :)

    Frankly, if I can break the habit anyone can. I was originally told “alt tag” and it took quite a while to stop saying it, even after I realised it’s not a tag.

  22. Perhaps part of the problem stems from the length of the word attribute. Let’s face it, “attribute” is kind of a pain in the ass word to say, and “tag” is, well, not. “Alt attribute” is especially heinous on the palate. However, that is no excuse for misusage. We should all be trying our darndest to use the proper diction or in a few years nobody will know what the hell anybody else is talking about.

  23. You bet! And never let me catch you talking about “class elements”… ;-).

    Oh crap. So this means I need to take down my entry on getElementsByClass.

  24. November 8, 2005 by theUg

    Wow, I didn’t even realise how bad it gets. I’ve never had a problem with proper usage, but seems like a lot of people like to get confused or confuse others.

    For me, proper terminology in any area is imperative and never was in question.

    By the way, Roger, I surprised to your reaction on post #8. In Russia, we say “Don’t tell me what to do, and I won’t tell you were to go.” (nondescriptory location, that is) ;).

    I guess ye Scandinavians truly are stereotypically levelheaded. Hence, by the way, our ironic oximoron “hotheaded Finnish fella” :D.

  25. In my attempts to become the markup and CSS Nomenclature Queen, I have to say this is one of my biggest pet peeves and support Roger completely in his post here.

    Why does naming matter you might ask? Well, it improves communication for one thing, which is an issue for people working on Web sites, particularly in teams. There’s long been a great divide between various specialties (my designers don’t talk to my programmers, and vice-versa kinda thing) and part of the problem is definitely language.

    Let’s take an extreme case. Let’s say you have two sons. One is named Element. The other is named Attribute. Attribute requires a medication to control his juvenile diabetes. Element is perfectly healthy.

    In a rush out the door, you say to your husband “Honey, please give Element his medicine.” You get home an hour later, and Element is running around the house on a sugar high, and Attribute is near comatose from falling blood sugar.

    Okay, it’s extreme, but you get the idea. Let’s call things what they are, shall we? And if we don’t know, let’s at least be open to correction. After all, that’s how we grow.

  26. JonB (comment 8) wrote:

    human language is full of contradictions and things which logically are wrong but which we all except as right

    I assume you meant “accept as right”, or is that an intentional demonstration of being logically wrong? :-)

    Roger, I think you may need to be a just a little more threatening to those that get it wrong. Personally, I like to pick up whatever’s handy and beat them senseless with it. I’ve also have had positive results from politely correcting the person, but I find it just doesn’t have the same impact. :-D

  27. November 8, 2005 by theUg

    “Impact” is a keyword there, innit? :)

  28. I holewartedly agree with Rolly and Moger about erect usage of crimonology - albeit Googlefight shows that this cause might be a lost case :-)

  29. November 8, 2005 by Roger Johansson (Author comment)

    Molly: Thanks for your support :-).

    Jens: Yeah, “alt tag” is in the lead, but it only took 36 hours for this post to get to the first page of a Google search for “alt tag”. A few more links and who knows, maybe, just maybe, a few more people will start saying “alt attribute” instead.

  30. @ Lachlan Hunt

    Good catch mate, of course I was making a point about language ahem

    Nah, typing fast and often whilst half asleep means I make spelling errors, I wish I could say English wasn’t my first language but alas it is.

    I think that in teaching we have to use the right terms, however in discussion it doesn’t matter what you say or how you say it, as long as the other person know’s what you mean and any web developer worth hiring would understand “alt tag” or “alt attribute” simply based on the context in which it was used.

  31. I see nothing wrong with Roger making his point (even for the third time), infact I believe if you’re going to learn a language, you learn it correctly, right? You can’t detest someone for wanting others to communicate with a tool correctly.

    If you comment on the work of a Building Architect, like so: “Hey, that’s a nice house” while looking at a building, they will look at you weird, as anyone else would. Now this isn’t the best analogy, it’s just a thought of the moment.

    Furthermore in support of this post, I will link to it in hopes of better search engine ranking of it.

    I knew Molly would support this point the second I finished reading it, and she did.

    To see other readers respond in negative fashion was a bit disgraceful towards Roger. I would understand if he was conveying this matter in a strict and superior way, but he wasn’t.

  32. I have always used the phrase “alt text”. Unfortunately, after reading the comments on this post, I have seen the phrase “alt t*g” so many times that it has been burned into my brain as a part of my vocabulary. Interesting how the discussion of an incorrect term has legitimized it in my internal parser.

  33. On another similar note, I often hear the phrase “class Id’s”. In a way I think it’s as if folks got caught up in thinking the class is sort of like an identifier for an element. Like:

    Can you change the class ID to read “warning” instead of “warn”

    Each time I need to remind them (or rather, question them)

    Are you talking about the class, or the id? Which one is it!

  34. There is a whole lot more that webdesignersthink they know and especially not know. eg juicystudio.com alone tackles lots of eg accesibility issues that webdesigners and webdevelopers never read or learn. The alt attribute is just the top of the heap. It is like hey I have this 900 pages book about XML but I never use it that much. Why not make a sort of online examination so that webdesigners and webdevelopers can learn these things like terminology and so on. Of course, there is a continuous adding and reviewing of things but common practise is what we all should learn.

  35. This might be an oversimplification, but I think this sums it up:

    Tag = Attribute =

    Might that be a good rule of thumb?

  36. Oops, the greater-than / less-than got stripped out of the last post.

  37. This is just why no one gets XML. Yeah The friggin thing is an attribute. It does matter what you call it. An attribute is a property of an element or tag and can not stand alone. How can people speak of semantic HTML and then say the difference does not matter. It is huge.

  38. I usually code my sites by hand - as I said in a previous response (dreamweaver review article) - and I always include them.

    Many sites, even corporate ones, don’t use the alt attribute. I guess the point of saying that - veering somewhat from the topic - is that simple things like this are not followed but should be.

    To Don from comment #38, true.

    Also, off the top of my head, I forgot if the W3C validators balk at the fact of missing alt attributes. I think it does, but - for some reason - im not 100% sure.

  39. November 11, 2005 by Roger Johansson (Author comment)

    Also, off the top of my head, I forgot if the W3C validators balk at the fact of missing alt attributes. I think it does, but - for some reason - im not 100% sure.

    Yep, it does:

    “Line 39 column 156: required attribute “ALT” not specified.”

  40. You think that is bad?

    I don’t remember what show it was, some popular talk show called this a podcast.

  41. If I had a penny for every time someone at T referred to them as “alt tags” … well … I’d have a ton of pennies.

    Wait, no - I mean several hundred.

    Eh. Ton. Hundred. Same thing.

  42. Looks like even Google made the mistake of calling it an alt tag.

Comments are disabled for this post (read why), but if you have spotted an error or have additional info that you think should be in this post, feel free to contact me.