Welcome to WebHeadStart.org

Web Technologies

Sponsored By

WebHeadStart.org is currently in beta.
Please pardon our appearance as we work to provide you with the most comprehensive reference on today's web technologies.

Interested in advertising on WebHeadStart? Become an advertising partner today!

[WWW-HTML Mailing List Archive Home] [Messages By Thread] [Messages By Date]

The ALT attribute and its semantics

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Thu, 18 Aug 2005 08:27:13 +0300 (EEST)
To: www-html@w3.org
Message-ID: <Pine.GSO.4.63.0508180811480.29462@korppi.cs.tut.fi>

On Wed, 17 Aug 2005, David Woolley wrote:

>>        <img src="enter.gif">
>
> As well as being off topic, that's not valid HTML!

Well, practical "how do I..." questions are off-topic here, but the markup 
above _is_ valid - when using an HTML 2.0 document type. Although it was 
questionable to make the ALT attribute optional, and although this was 
fixed in subsequent HTML specifications, the HTML 2.0 specification was 
here, as usual, a big improvement over its successors in clarity
of semantic definitions:

"HTML user agents may process the value of the ALT attribute as an 
alternative to processing the image resource indicated by the SRC 
attribute."

and

"ALT
   text to use in place of the referenced image resource, for example due
   to processing constraints or user preference."

Compare this with the awful "short description" characterizations in HTML 
4.01 specification or with its definition
"For user agents that cannot display images, forms, or applets, this 
attribute specifies alternate text."
followed by prose that talks of many things, including browsers that _can_ 
display images...

The morale is, I think, that the specification of a markup language should 
clearly distinguish normative semantic definitions and requirements from 
explanatory prose (and both of them from syntactic requirements). 
Naturally, the explanatory text should be reasonably consistent with the 
normative text, since people often confuse the two anyway.

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/ 
Received on Thursday, 18 August 2005 05:27:28 GMT
Valid XHTML 1.0! Valid CSS! Site Map | Privacy Policy | Terms of Use | WebHeadStart.org © 2005 All Rights Reserved.