On Mon, Nov 23, 2009 at 2:51 PM, ludicco <[email protected]> wrote: > Thanks for the tip Mislav, yes I see your point, but the thing is, if > it's optional, why not fill this 'optional'? > or why don't let the user decide if he wants its closed or not (even > with :autoclose)? > Particularly I don't see a point in make the closing tag "optional" in > html5 (I know this is not a haml approach but the markup's), I think > this tends to causes confusion and this is opposed as 'standard' in my > opinion. > I can agree for html4 and older, but now we have more markup standards > and everything, so why keep using the old way to do it?
The reason self-closing tags are supported in HTML 5 is for backwards compatibility with XHTML, and for authors who want to create documents that can be checked against an XML validator. HTML 5 loosens a restriction of XHTML, in that, a valid HTML document does not need to be a valid XML document. So worrying about having "<br />" rather than "<br>" is pointless unless you're validating your document as XML. Using self-closing tags in HTML 5 is pretty much the equivalent of using semicolons in Ruby, and I would guess you're only doing it out of habit. If you're doing HTML 5 and want to be consistent, then I would recommend not using self-closing tags unless you have a compelling technical reason to do so. --Norman -- You received this message because you are subscribed to the Google Groups "Haml" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/haml?hl=.
