W3C home > Mailing lists > Public > public-html@w3.org > June 2010

Re: HTML4 Diffs - Object, again

From: Kornel Lesinski <kornel@geekhood.net>
Date: Sun, 27 Jun 2010 15:12:54 +0100
To: public-html@w3.org
Message-ID: <op.veyprszvptj49s@aimac.local>
On Sun, 27 Jun 2010 05:48:16 +0100, Leif Halvard Silli  
<xn--mlform-iua@målform.no> wrote:

> And also: Every time the HTML4 validator discover an element in an
> illegal context, it typically tells you to nest it inside a <object> or
> <map> or <button> if you want to have it there.
> I find it hard to believe that all these things are side effects of the
> fact that HTML4 is expressed as a DTD.

Note that analogous use of <INS> and <DEL> is explicitly forbidden in  


Given that I think it was not intention to have "wildcard" elements in  
HTML 4 that allow violation of content model "if you want to have it  

Assuming it's not simply limitation of DTD and omission in the spec, my  
theory is that <object>, <button> and <map> were expected to be rendered  
as inline-block (replaced) elements, and given HTML4's strong correlation  
of display model and content model, it made sense to allow block content  
in these elements.

<p>foo<object style="display:inline-block">bar<br>baz</object>quz</p>

However, in current implementations <object> fallback is rendered as if  
<object> was inline:

<p>foo<object data="http://example.invalid">bar<br>baz</object>quz</p>

so that reason is gone.

Personally I don't like the error message suggesting insertion of  
<object>, because it's misleading. It's extremely unlikely that author  
wanted to embed an object, put fallback in, but forgot the <object>  
element itself.

It seems to me that this error message is just unfortunate side-effect of  
validator's implementation rather than deliberately chosen authoring  

Such error is much more likely to be triggered by unclosed inline element  
or author's misunderstanding of HTML content model. Validator should  
suggest to close inline element or explain that block elements are not  
allowed in inlines, instead of suggesting a fudge that only hides true  
cause of the error.

regards, Kornel Lesiński
Received on Sunday, 27 June 2010 14:13:35 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:45:20 UTC