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

href within <area> is supposed to be optional

From: Antonio Zamora <antonio_zamora@verizon.net>
Date: Thu, 11 Aug 2011 18:45:50 -0400
Message-ID: <CAEDm4883fLHLB9Xa+vmCqnxqVH=xodTF+Tw1yQHPZw4OtxUkPQ@mail.gmail.com>
To: www-validator@w3.org
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

However, according to the specs, the href is not required.  This is
important since the nohref is now deprecated.

4.12.2 Links created by a and area elements
The href attribute on *a* and *area* elements must have a value that is a
valid URL potentially surrounded by spaces.
The href attribute on *a* and *area* elements is not required; when those
elements do not have href attributes they do not create hyperlinks.

This is the web page that I used for testing,  I had to use href keywords
with a local URL to pass the validation, although I would have preferred to
have omitted the href.


Antonio Zamora
Received on Friday, 12 August 2011 13:07:41 UTC

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