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

Re: <br> tag incorrect, but validates anyway

From: David Dorward <david@dorward.me.uk>
Date: Tue, 19 Dec 2006 14:45:59 +0000
To: "J. Takiff" <jontakiff@yahoo.com>
Cc: www-validator@w3.org
Message-ID: <20061219144559.GB12688@us-lot.org>

On Mon, Dec 18, 2006 at 09:19:34PM -0800, J. Takiff wrote:
>    Hi, I just wanted to let you know that my code has been validated
>    XHTML Strict despite a number of <br> tags written as follows: < /br>

You didn't provide any code, but I assume you have code that looks like:

  <br></br>

instead of:

  <br />

This is allowed in XHTML and the two statements are identically
equivalent.

If you are serving your XHTML as text/html then Appendix C says you
should use the latter syntax. It isn't clear if this is a hard
requirement or a strong suggestion as the spec isn't very well
written. (For this, and several other reasons, I avoid using XHTML for
serving up webpages).

-- 
David Dorward                                      http://dorward.me.uk
Received on Tuesday, 19 December 2006 14:46:14 GMT

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