[html5] That alt tag!

Ian Hickson ian at hixie.ch
Mon Jun 17 14:16:36 PDT 2013

On Sun, 9 Jun 2013, Bob McClelland wrote:
> Dear Colleagues,
> Is 'alt' in or out, for validation?

You should always give an alt="" attribute containing the textual 
equivalent of the image. For details and lots of help on how to do this, I 
recommend reading this section of the spec:


> The validator always used to complain if I didn't have one, then 
> recently it stopped doing (And I read reports that "I didn't need to use 
> an alt tag any more)  and today it's complaining again!

Probably just a transient bug in the validator.

> All this chopping and changing drives me potty and gives rise to two 
> questions- 1) What is the current position regarding alt tags

Same as it always has been, basically. This hasn't changed.

> and 2) what's the best way to be informed whenever a change (to any part 
> of the whole html5 spec) is implemented?

If you mean, how can you find out when the HTML standard is updated, then 
there's a tool in the specification itself that lets you subscribe to 
changes. (Note that there can be dozens of changes a day, as we're 
constantly working to improve the spec.) To subscribe to these changes, 
click the "Edit Subscriptions" button at the top right of this page:


On Sun, 9 Jun 2013, Jukka K. Korpela wrote:
> Any answer to your question may be outdated at any moment, even between 
> the moments that someone writes an answer and someone else reads it, so 
> a specific answer is not particularly interesting. You can check today's 
> position in WHATWG Living HTML at 
> http://www.whatwg.org/specs/web-apps/current-work/multipage/embedded-content-1.html#alt 
> (I suppose the structure will be retained even though the content 
> changes, so this URL should work at least for a long time.)

This answer makes it sound like these things change at a whim, but they 
don't. We fix errors, we provide new features, but we don't change things 
that are correct.

> Some people think that generators should be allowed to omit alt 
> attributes, in order to prevent them from emitting some nonsensical or 
> plain wrong alt attributes.

They're not allowed to omit alt="" attributes, but it is true that the 
specification does provide guidance on what to do when a generator has no 
way to generate a correct alt="" attribute.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

More information about the Help mailing list