W3C home > Mailing lists > Public > www-validator@w3.org > December 2002

Re: possible validator bug - '>' not requred to close tag

From: Nick Kew <nick@webthing.com>
Date: Thu, 5 Dec 2002 21:18:23 +0000 (GMT)
To: m_to-validatorlist-re_tagclosing@wickline.org
cc: www-validator@w3.org
Message-ID: <Pine.LNX.4.21.0212052049520.1348-100000@jarl.webthing.com>

On Thu, 5 Dec 2002 m_to-validatorlist-re_tagclosing@wickline.org wrote:

> The above page has a menu option which is missing the closing > for an 
> option element's close tag.

This is an FAQ.

In the hope that we can assemble a proper FAQ document for the
validator, let me try and contribute a fuller-than-usual answer
(Olivier, are you OK with assembling FAQs as-and-when someone asks
a question in an intelligible manner and round tuits can be found)?

Q: I found some nasty typo like <p<a ...> but the validator accepted it!


Short answer - If the validator didn't complain, then your usage is legal!

Technical answer - this is an SGML rule known as SHORTTAGS.  The official
SGML declaration for HTML permits shorttags, so the validator would
technically be wrong to reject them.  This has been the subject of
some debate within the validator team.   As we understand it,
the decision to permit shorttags was deliberate, because dispensing with
it would also outlaw other constructs which are widely supported in HTML.

Political answer - because it is technically legal, the validator
must allow it.  The decision is for the HTML working group, not for
the validator team to make.

Practical answer - though technically legal, this is not supported
by most real-life user agents (such as browsers), and should not
normally be used in a webpage.  OpenSP, the SGML parser used by the
validator, has an option to generate warnings about shorttags.
These warnings are available as a user option, and are enabled by
default in some online validation services including Page Valet
and the WDG Validator.

-- 
Nick Kew
Received on Thursday, 5 December 2002 16:20:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:05 GMT