On 11 Sep 2007, at 10:00, Mohamed Jama wrote:
First of all isn't ALT an attribute not a TAG?

Yes, it is.

(but see Part 5 of "NOT the comp.text.sgml FAQ" http:// www.flightlab.com/~joe/sgml/faq-not.txt :)

1.  When should one use an empty tag?

I don't think you should empty attribute to start with, its all noted
down in your DTD if you open it up for example the strict.dtd and search
through you'll find this paragraph

<!--
   To avoid accessibility problems for people who aren't
   able to see the image, you should provide a text
   description using the alt and longdesc attributes.

See also the description of the attribute recommendation, which is normative and not a comment:

http://www.w3.org/TR/html4/struct/objects.html#adef-alt

In particular:

  'this attribute specifies alternate text'

Note that it says "alternate" not "descriptive".

and:

'Do not specify irrelevant alternate text when including images intended to format a page, for instance, alt="red ball" would be inappropriate for an image that adds a red ball for decorating a heading or paragraph. In such cases, the alternate text should be the empty string ("").'

Which positively embraces the use of an empty string.

Why would you have an empty attribute, just write something inside it if
you already took the time to add the attribute.

Because the attribute is mandatory but the image might be decorative, or present information that appears elsewhere in the page in a visual manor, so a non-empty string would not be an appropriate alternative. alt="" effectively says "The author has considered this image and determined that if it can not be displayed then nothing should be put it its place". A number of user agents (Lynx included) take a missing attribute (which is a syntax error) to mean "The author has not considered alternative text at all, so the user agent should present as much information as is known (such as the file name) to the user in the hope they can infer some meaning from it".

--
David Dorward
http://dorward.me.uk/
http://blog.dorward.me.uk/




*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************

Reply via email to