top | item 6307664

(no title)

jms18 | 12 years ago

Why?

discuss

order

netghost|12 years ago

I like requiring closing tags, while I think the Html5 spec says some tags can be implicitly closed (like <li> for instance).

Could be wrong though, my wife often points out that it happens...

Supermighty|12 years ago

I used to be like you. I believed in the proper correctness of of markup; proper closing tags, proper nesting. But I've come to see the light. The WWW succeeded and flourished because of it's faults and it's lazy error checking. Thousands of non-technical people writing their own html. Thankfully it didn't have to be perfect and it worked.

I still like tidy clean code, but I don't agonize over it's perfection.

keeperofdakeys|12 years ago

One of the big differences between HTML4 and HTML5 is that implicit closing tags are defined in the spec, and not just a consequence of browser implementations. So "error handling" in HTML4 has essentially become a feature in HTML5

For XHTML, one of the big ideas was that you could use an XML parser, and embed custom XML. Since an XML parser errors on invalid input, it can be smaller and faster. Having an XML parser also means embedded XML is easy to deal with. However, all this falls down when you consider that nearly all XHTML was sent as HTML, so the XML parser never kicked in. All this meant you required properly formatted files.

eCa|12 years ago

Nothing stops you from closing tags if you want to (like me). It is very much allowed by html5.

gizmogwai|12 years ago

Because maybe we would not have to reinvent the wheel (making it oval, by the way) for each and every "new" feature that come along HTML5 (I'm looking at you, Web components).