Click here to get back home

W3C Validator error?
is valid for doctype HTML 4.01 Strict

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
W3C Validator error?
is valid for doctype HTML 4.01 Strict
thomas_jedenfelt_1 04-21-2005
Get Chitika Premium
Posted by thomas_jedenfelt_1 on April 21, 2005, 12:46 pm
Please log in for more thread options


Hi everyone,

Is the W3C HTML Validator [1] in error when it returns <br /> as valid
for HTML 4.01 Strict doctype?

In March 2004 [2], the Validator returned <br />, <hr /> and <img />
as invalid for HTML 4.01 Strict.

Liam Quinn said [2] "You can't mix HTML and XHTML. You need to choose
one or the other syntax."
[meaning: choose <br> for HTML and <br /> for XHTML]

As for today, the Validator returns <br /> and <img /> as valid for
HTML 4.01 Strict, but <hr /> (and also <meta /> and <link />)
as invalid.

It seems that the Validator has changed its behaviour since 2004.

[1] http://validator.w3.org/
[2] http://lists.w3.org/Archives/Public/www-validator/2003Mar/0028
Liam Quinn is a founding member of WDG (Wed Desing Group).

Thanks,
Thomas Jedenfelt
Tyresö (Stockholm), Sweden



Posted by Jukka K. Korpela on April 21, 2005, 8:10 pm
Please log in for more thread options


thomas_jedenfelt_1@operamail.com wrote:

> Is the W3C HTML Validator [1] in error when it returns <br /> as
> valid for HTML 4.01 Strict doctype?

No, because <br /> is valid (and equivalent to <br >>).

> In March 2004 [2], the Validator returned <br />, <hr /> and <img
> /> as invalid for HTML 4.01 Strict.

No, you misunderstood - which is understandable, since the statement
was not very clearly formulated.

The reason why <br /> is valid is that wherever <br> is allowed, it may
be followed by character data, so <br>> is valid too. But <hr /> is
often not allowed in HTML 4.01 Strict. If you have
<body>
<hr>>
</body>
then <hr> is OK (hr is a block level element) but > is not.

For a detailed explanation, see
http://www.cs.tut.fi/~jkorpela/html/empty.html

> It seems that the Validator has changed its behaviour since 2004.

Not in this respect; the report about its behaviour was just vague.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


Posted by Thomas Jedenfelt on April 21, 2005, 2:46 pm
Please log in for more thread options


Hello Yucca,

Thanks for replying.

The discussion seems to concern two issues:

1. Changed behaviour of W3C Validator
2. <br /> conforming to HTML 4.01 Specification

1.
I don't agree with you that I have misunderstood the thread at
www-validator@w3.org [1].

Because, the teacher that checked (in March 2004) his HTML 4.01 Strict
document got <br /> and <img /> as invalid by the Validator.

So, that would mean that the Validator has changed its behaviour since
March 2004, as it nowadays returns <br /> as valid for an HTML 4.01
Strict document.

Now, although I have written W3C/WAI valid docuemnts
(non-professionally) since 1999(?) - and read the W3C technical reports
- I have failed to notice (in the 4.01 Spec.) that <br /> is valid HTML
4.01 Strict, because during the years from XHTML Spec. <br /> was not
valid 4.01, if I remember correctly. Therefore, I have, until now,
regarded <br /> as unique for XHTML documents.

So, it seems that they have updated the Validator, as they do from time
to time.


2.
I am too tired to continue. I will finnish tomorrow.

Thanks also to Steve and Leif for replying. (I just saw your messages.)

Regards,
Thomas Jedenfelt

[1]
http://lists.w3.org/Archives/Public/www-validator/2003Mar/0028


Posted by David Dorward on April 21, 2005, 11:08 pm
Please log in for more thread options


Thomas Jedenfelt wrote:

> 1. Changed behaviour of W3C Validator
> 2. <br /> conforming to HTML 4.01 Specification
>
> Because, the teacher that checked (in March 2004) his HTML 4.01 Strict

I think you mean 2003.

> document got <br /> and <img /> as invalid by the Validator.

> So, that would mean that the Validator has changed its behaviour since
> March 2004, as it nowadays returns <br /> as valid for an HTML 4.01
> Strict document.

Since they didn't provide an example document demonstrating the issue, it is
difficult to try to reproduce it. I suppose the public CVS archives might
go back far enough that its possible to retrieve it, but that's rather too
much effort for me to worry about right now.

Either:

1. There was a bug in the validator in early 2003 that has now been fixed

or

2. The author of that email was finding that <hr /> was invalid and
*assuming* that <img /> and <br /> were too.

I'd suspect option 2 myself.

> Now, although I have written W3C/WAI valid docuemnts
> (non-professionally) since 1999(?) - and read the W3C technical reports
> - I have failed to notice (in the 4.01 Spec.) that <br /> is valid HTML
> 4.01 Strict

The spec doesn't say that it is valid, nor does it say that its invalid. Its
obscure stuff that you generally don't find out unless you read the SGML
spec or someone else explains it to you.


--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is


Posted by Nick Kew on April 22, 2005, 1:32 am
Please log in for more thread options


David Dorward wrote:

> 2. The author of that email was finding that <hr /> was invalid and
> *assuming* that <img /> and <br /> were too.
>
> I'd suspect option 2 myself.

I wouldn't.

I expect the reason for the difference was context.
Technically speaking, <hr/> & friends are valid where
bare text is allowed. Your example now had them inside
a <p> or <div> or somesuch, whereas in the 2003 example
they were not in a valid context.

--
Nick Kew

Similar ThreadsPosted
Valid XHTML 1.0 Strict without javascript shows an error on ie6/ie7 May 5, 2006, 7:14 pm
W3C HTML Validator Error - Invalid content-type November 13, 2004, 1:48 am
W3C validator error isn't really an error? September 13, 2005, 1:21 am
error(?) "302 Found" on Validator XHTML W3C August 5, 2005, 6:19 am
XHTML validator giving an error for onMouseOver August 5, 2005, 2:24 pm
XHTML Validation Error while using w3 validator service July 13, 2007, 2:11 pm
Valid XHTML strict messed up in IE Mac December 20, 2004, 7:13 pm
Gap Above Table with Strict Doctype December 14, 2004, 1:27 pm
target in strict doctype December 16, 2007, 12:40 pm
[Validator] error validating HTML4.01 PHP maden page July 10, 2005, 10:13 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap