

Using CSS With No HTML At All  - mambodog
http://css-tricks.com/using-css-without-html/

======
powrtoch
"But it's almost 2011, who’s still using XHTML anyway?"

This caught me totally off guard. My experience has been that XHTML is much
easier to manage across browsers than HTML 4. Can anyone chime in as to
whether I'm crazy?

~~~
rimantas
Yes, you are. There is zero benefit in using XHTML with text/html. You can
have lowercase tags and quoted attributes in HTML4 if you want so. You don't
pollute your markup with meaningless "/" which browsers treated as the invalid
attribute anyway. Ok, it's not actually meaningless but <br /> in HTML(SGML)
means completely different thing than in XML, only browsers did not implement
that part properly. Is short: if you were using XHTML markup with text/html
MIME, you were using marketing XHTML, which was parsed by browsers' engines as
HTML not XML anyway. If you were using application/xhtml+xml MIME type you'd
know the difference. It would be interesting to see how XHTML was "easier to
manage across browsers" given that IE does not even understand XHTML.

I used XHTML for a short while before I learned what it actually meant. Then I
switched to HTML4.01, now HTML5. The nice thing about HTML5 is that it let's
you have any syntax you want and it is not based neither on SGML nor XML.

~~~
zokier
Could you explain the <br> vs <br /> difference in HTML? HTML5 spec says that
void elements may optionally include slash[1], and from the wording I'd assume
that it means that they should be treated equally.

[1] <http://dev.w3.org/html5/markup/syntax.html#void-element>

~~~
mambodog
As I understand it, basically the 'self-closing tags' are considered valid
markup, but this comes under WHATWG's philosophy of trying to be inclusive as
much existing markup that is out there as possible (within reason). This is in
opposition to the strictness of XHTML's approach.

This post by hixie indicates that self-closing tags are allowed to 'ease
migration': [http://lists.whatwg.org/pipermail/help-
whatwg.org/2008-Augus...](http://lists.whatwg.org/pipermail/help-
whatwg.org/2008-August/000137.html)

I believe the 'spirit' of the spec would imply that <br> is the best practice
when writing new markup. HTML5 maintains no pretence of being XML.

