[whatwg] Empty elements

Ian Hickson ian at hixie.ch
Wed Feb 15 14:48:57 PST 2006


On Wed, 15 Feb 2006, Tim Altman wrote:
> 
> May OBJECT and CANVAS be treated as empty elements, i.e. <canvas /> and
> <object /> if there is no fallback content?

I don't understand your question.

If you mean "Can the string '<object/>' be treated as an empty element 
tag", the answer is no.

If you mean "Can the string '<object>' be treated as an empty element tag 
if there is no matching '</object>'" then the answer is no according to 
the current spec, and will probably remain "no" lest legacy compatibility 
problems are discovered that require that to change.

If you mean "Can the string '<object></object>' be treated as an empty 
element" then yes, what else would it be treated as?


> Is fallback content required on OBJECT and CANVAS?

Just like with <img alt="">, the lack of fallback content on either of 
these would merely indicate that they were semantically neutral and not 
conveying any extra information. For example:

   <h1>The foobar</h1>
   <p>The foobar is a green circle.</p>
   <p><object data="greencircle.png"></object></p>

There is no fallback here because it would be redundant -- the image 
paragraph is merely repeating the previous paragraph for emphasis in 
visual media.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list