[whatwg] void elements vs. content model = "empty"

ryan ryan at theryanking.com
Wed Apr 18 13:36:09 PDT 2007


So, I was just trying to check my blog for HTML5 conformance [1] and  
ran into a conformance problem that I had trouble sorting out.

The conformance checker said:

>    1. Fatal Error: End tag param seen even though the element is an  
> empty element.
>       Line 121, column 73 in resource http://theryanking.com/blog/

so, I went to http://www.whatwg.org/specs/web-apps/current-work/ 
#param to see what the restrictions on param are. In that section it  
says:

> Content model:
>     Empty.

which brought up the question "what's 'empty' mean?". In my mind, it  
could either be "no content allowed" or "must be a void element" (ie,  
no end tag).

It took me awhile to realize that empty content was the same thing as  
a void element (it is, right?), which then helped be figure out that  
param couldn't have an end tag.

It'd be nice if we could make this clearer in the spec– even though  
the language and html serialization are two different things, for the  
sake of authors it'd be nice to have pointers between the two.

Also, if there's a difference between content=empty and 'void  
elements' it deserves an explanation.

-ryan

1. http://hsivonen.iki.fi/validator/?doc=http%3A%2F%2Ftheryanking.com% 
2Fblog%2F&parser=html5


More information about the whatwg mailing list