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

RE: Minimized tags error

From: Daniel L. Koger <dkoger@speakeasy.org>
Date: Tue, 27 Mar 2001 20:59:05 -0500 (EST)
To: "'Masayasu Ishikawa'" <mimasa@w3.org>, <csmith@barebones.com>
Cc: <www-validator@w3.org>
Message-ID: <002001c0b729$1b86b8d0$6501a8c0@kogers.com>
Just a comment.  I thought <br>> was treated as <br>&gt; whereas <br />
would be treated as <br "/" > where "/" is the literal string /.  I was
going to say that this could make a difference in processing, but I guess it
doesn't in the cases I could come up with.


-----Original Message-----
From: www-validator-request@w3.org
[mailto:www-validator-request@w3.org]On Behalf Of Masayasu Ishikawa
Sent: Tuesday, March 27, 2001 3:34 PM
To: csmith@barebones.com
Cc: www-validator@w3.org
Subject: Re: Minimized tags error

Christian Smith <csmith@barebones.com> wrote:

> Why is the validator passing this as valid?

Because this is not invalid.

> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html>
>     <head>
>         <title>Sidebar</title>
>     </head>
>     <body>
>         <p>
>         252 Riddle Pond Road<br />
>         WTopsham VT 05086<br />
>         </p>
>     </body>
> </html>
> This looks like a bug to me. <br /> is an XHTML formatted tag and doesn't
> belong in an HTML document.

The SGML declaration of HTML 4.01 says "SHORTTAG YES", which allows
this kind of shorthand markup.  However, in this case the null end-tag
(NET) delimiter is "/", so ">" is just treated as character data.
In other words, "<br />" is an equivalent of "<br>>" in this case.

Try the validator with "Show parse tree" option, then you'll see
that ">" after "<br /" is not parsed as part of markup but as just
a character in the parse tree.

Masayasu Ishikawa / mimasa@w3.org
W3C - World Wide Web Consortium
Received on Wednesday, 4 April 2001 13:54:14 UTC

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