[whatwg] Allow trailing slash in always-empty HTML5 elements?

Michel Fortin michel.fortin at michelf.com
Thu Nov 30 11:48:06 PST 2006

Le 30 nov. 2006 à 10:16, Henri Sivonen a écrit :

> Without labels, I do think that regardless of how the HTML5 spec  
> turns out, WordPress has an architectural flaw in its methodology  
> of producing markup. Since the flaw is in the architecture, I am  
> not optimistic of it getting fixed in WordPress because it would  
> require a rewrite. I'm hoping that at some point, a better system  
> enters the market. Meanwhile, asking the WP developers to rewrite  
> theirs seems unproductive.

I concur with that. While it may be true that WordPress often gives  
valid XHTML1 markup, it can't be denied that the internal processing  
manipulates pseudo-HTML tag soup at almost every levels, that's not a  
good architecture if you ask me. Integrating Markdown correctly into  
the text system of WordPress is a big hack because of that; filters  
have to be inserted all around the place as workarounds for various  
issues. I've written on the subject if someone wants to dig deeper:


The best way someone could fix the resulting tag soup would probably  
be to pass the result through HTML Tidy. And it should be pretty  
straightforward since the tidy library has been part of PHP since  
version 5.

  - - -

For me, accepting /> in HTML could be an acceptable solution. It sure  
is a departure from what was accepted as HTML previously, but I see  
no point in trying to convince everyone to change (again) their  
markup for cosmetic reasons.

What is really important is that authors understand better that HTML  
must be served as text/html and that XHTML must be served with an xml  
media type. If the validator enforce that, then I think it'll be  

What really confused people with XHTML1 is that the validator accepts  
XHTML1 as text/html without complaining, without even checking that  
the document will do fine when parsed as HTML. If the validator tells  
someone that his <div/> is perfectly valid for XHTML1 as text/html,  
it's normal for that person to wonder why it doesn't work in the  
browser. That's confusing for authors, and that's exactly what we  
should avoid.

Michel Fortin
michel.fortin at michelf.com

More information about the whatwg mailing list