W3C home > Mailing lists > Public > html-tidy@w3.org > January to March 2002

Re: Tags lacking a terminating '>' are spotted

From: Dave Raggett <dsr@w3.org>
Date: Wed, 13 Feb 2002 09:52:00 +0000 (GMT Standard Time)
To: "Richard A. O'Keefe" <ok@atlas.otago.ac.nz>
cc: bfowler@ewitness.co.uk, html-tidy@w3.org
Message-ID: <Pine.WNT.4.10.10202130947170.-360867@hazel>
Thanks for jogging my memory. The HTML working group wanted to
support the widespread practice of omitting quote marks around
attribute values when these didn't include spaces. This forced
SHORTTAG YES even though none of the browsers supported the other
features implied by SHORTTAG YES.

My advice is not to encourage authors to rely on short tags.
Please don't extend Tidy to fully support shorttags.


On Wed, 13 Feb 2002, Richard A. O'Keefe wrote:

> I wrote:
> 	>The SGML declarations in the HTML 3.2 and HTML 4.0 specifications
> 	>very clearly disallow this (leaving out the > at the end of a tag
> 	>when there is a following <).
> 	
> bfowler@ewitness.co.uk (ewitness - Ben Fowler) very properly challenged
> this:
> 
> 	Do you have a URL for this?
> 	
> The relevant part is section 20.1 "SGML Declaration"
> of http://www.w3.org/TR/html4/sgml/sgmldecl.html
> 
> The SHORTTAG feature of SGML controls three things:
>     (1) Empty tags <> and </>, where the generic identifier is inferred;
>         empty end-tags make a lot of sense, but the rules for empty
>         start-tags are sufficiently involved, not to say weird, that
>         even a die-hard SGMLer would be wary of them.
> 
>     (2) Unclosed tags <foo<... </foo<...        
> 	where the > that closes a tag may be omitted "when it is followed
> 	immediately by another tag".
> 
>     (3) Null end tags <foo/..../ where the start-tag ends with / and the
>         end-tag is then simply /.  I am very fond of these; I'd _much_
>         rather write <em/this/ than <em>that</em>.
> 
> Now section B.3.7 says to avoid all of these things, and the simple
> way for the HTML designers to have been serious about that would have
> been for them to put "SHORTTAG NO" in the SGML declaration.  It would
> have made it easy for people to check that their documents didn't use
> these features.
> 
> In fact my local copy of HTML.dcl _was_ hacked to say SHORTTAG NO.
> Trouble is, I'm the one that hacked it, and I'd forgotten that.
> The _official_ SGML declaration says "SHORTTAG YES", thus explicitly
> requiring HTML processors to support these features that B.3.7 says not
> to use.
> 
> Is it just me, or is that odd?
> 

Regards,

-- Dave Raggett <dsr@w3.org> or <dave.raggett@openwave.com>
W3C Visiting Fellow, see http://www.w3.org/People/Raggett 
tel/fax: +44 122 586-6240 (or 7351) +44 771 213 7629 (mobile)
Received on Wednesday, 13 February 2002 04:52:08 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:51 GMT