Re: Empty element tags

Gabrielle Serra scripsit:

> I have a question about compatibility to our goal #8 MicroXML shall be able
> to straightforwardly represent HTML
> 
>  <!ELEMENT BR <http://www.w3.org/TR/html401/struct/text.html#edef-BR> - O
> EMPTY -- forced line break -->
> 
> means <br> is an empty element without a closing tag ? or means <br/> is
> allowed ?

Both <br> and <br/> work to force a line break; indeed, loose slashes are
always ignored in HTML5 start tags.  Unfortunately, </br> *also* forces
a line break, so <br></br> will give you two line breaks.  This is why
my editor's draft has a special rule requiring any element named "br",
when empty, to be expressed with an empty-tag.  (No semantics are given
or required).

Fortunately, no other HTML element has this property.  If you write <meta
blah-blah-blah></meta>, the close-tag is just ignored.

-- 
Don't be so humble.  You're not that great.             John Cowan
        --Golda Meir                                    cowan@ccil.org

Received on Friday, 17 August 2012 16:47:36 UTC