Image syntax
Michel Fortin
michel.fortin at michelf.com
Thu Jul 28 19:33:05 EDT 2005
Le 28 juil. 2005, à 16:35, Eric Daspet a écrit :
> Well, the HTML specification is clear about that :
>
> "The alt attribute specifies alternate text that is rendered when the
> image cannot be displayed. User agents must render alternate text when
> they cannot support images, they cannot support a certain image type or
> when they are configured not to display images."
I agree with that definition which seems to be the most logical, but I
would also like to point out that the spec is contradicting itself on
that:
From the HTML 4.01 spec:
> <BODY>
> <P>I just returned from vacation! Here's a photo of my family at the
> lake:
> <IMG src="http://www.somecompany.com/People/Ian/vacation/family.png"
> alt="A photo of my family at the lake.">
> </BODY>
>
> [...]
>
> The alt attribute specifies alternate text that is rendered when the
> image cannot be displayed (see below for information on how to specify
> alternate text ). User agents must render alternate text when they
> cannot support images, they cannot support a certain image type or
> when they are configured not to display images.
>
> [...]
>
> The alt attribute provides a short description of the image. This
> should be sufficient to allow users to decide whether they want to
> follow the link given by the longdesc attribute to the longer
> description, here "sitemap.html".
<http://www.w3.org/TR/html401/struct/objects.html#h-13.2>
What I think all this means is that you shouldn't write meaningless
descriptions inside alt attributes (like for interface elements -- "red
bullet"!). But when the image is part of the content, not just
decoration, then it makes sense to include a description. You just have
to decide if the image is decoration or not.
**But**, what HTML really need is an image caption element.
Michel Fortin
michel.fortin at michelf.com
http://www.michelf.com/
More information about the Markdown-Discuss
mailing list