W3C home > Mailing lists > Public > www-validator@w3.org > April 2007

Re: </A> flagged as illegal when previois "" missing

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Sun, 8 Apr 2007 20:39:45 +0300 (EEST)
To: pbhd@compuserve.com
cc: www-validator@w3.org
Message-ID: <Pine.GSO.4.64.0704082033080.9661@mustatilhi.cs.tut.fi>

On Sat, 7 Apr 2007, Peter Bauer wrote:

> This is flagged with Error 'end tag for element "A" which is not open.'
> <p><A HREF=http://thomer.com/vi/vi.html><img src=vi.powered.gif 
> ALT="vi"></A>

Technically, the error message is correct, though quite confusing.

> The following is accepted by the validator
> <p><A HREF="http://thomer.com/vi/vi.html"><img src=vi.powered.gif 
> ALT="vi"></A>
> So I understand that the error is the absence of the "" around the url...

In practical terms, that's right.

However, from the formal point of view - which is all that matters to a 
validator, by definition - the situation is quite different. Obviously you 
are using an HTML 4.01 document type. Then quotation marks may be omitted 
around attribute values in some cases. The validator reads

<p><A HREF=http:/

and everything is formally correct up to that point, since if http: were 
the attribute value, quotation marks would not be needed. Then comes the 
solidus (slash). By HTML 4.01 rules, ignored (in this issue) by almost all 
browsers, but by definition imposed by validators, the solidus in this 
context terminates the <a ...>...</a> element! Therefore, the subsequent 
</A> is an error.

For a more detailed explanation, see the Saga of the Slashed Validators,

Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
Received on Sunday, 8 April 2007 17:39:58 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:51 UTC