W3C home > Mailing lists > Public > www-validator@w3.org > August 2011

Re: href within <area> is supposed to be optional

From: Michael[tm] Smith <mike@w3.org>
Date: Fri, 12 Aug 2011 23:05:09 +0900
To: Antonio Zamora <antonio_zamora@verizon.net>
Cc: www-validator@w3.org
Message-ID: <20110812140509.GB40668@sideshowbarker>
Antonio Zamora <antonio_zamora@verizon.net>, 2011-08-11 18:45 -0400:

> The HTML validator gives the following error for an <area> element which has
> no href=
> Validation Output: 1 Error
>    Error Line 93, Column 23: Element area is missing required attribute
> href.

The only circumstance in which the validator would emit that message is
when the area element also has an alt attribute, in which case the error
message is correct, because the spec doesn't allow alt to be specified on
area elements unless the href attribute is also specified.


  "If the area element has an href attribute, then the area element
   represents a hyperlink. In this case, the alt attribute must be
   present... If the area element has no href attribute, then the area
   represented by the element cannot be selected, and the alt attribute
   must be omitted."

Michael[tm] Smith
Received on Friday, 12 August 2011 14:05:10 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:18:04 UTC