http://qs1969.pair.com?node_id=488865


in reply to Re: PerlMonks has changed me
in thread PerlMonks has changed me

HTML and XHTML are not the same, and every version of HTML is an application of SGML
No. XHTML is eXtensible HTML. That's what it stands for, and it was named that because that's what it is.
I am sorry, but that is incorrect. XHTML is HTML's successor, not merely the XML version of HTML. The goal of XHTML is to replace HTML with a saner, reformulated model for representing hypertext on the web. Yes, the initial versions of XHTML were designed to be backward compatible with HTML, but that goal is only for transition; XHTML 2, for instance, breaks compatibility with HTML and enters entirely new territory. Got it? HTML is one family of markup languages, whose line ended with HTML 4, and XHTML is another family of markup languages that replaces HTML and whose initial versions are backward compatible with HTML.

XHTML "is" HTML only the layman's sense that HTML means "the mysterious stuff programmers write to make web pages."

Yes, if Perlmonks pages are served out as HTML4, then it's technically okay to omit closing tags as per the HTML4 spec, on Perlmonks.
It is not just "technically okay" but perfectly acceptable. If the document type is HTML 4, you are absolutely, positively allowed to use markup minimization. You don't make a web browser's job easier or earn markup karma by using XML markup in HTML documents. If the browser can handle HTML, it knows SGML parsing rules, and it can handle markup minimization just fine.
As a rule, however, [using HTML markup] is a bad habbit of which you should really try to break yourself as soon as possible, for a wide variety of reasons.
You can't just make up your own rules that "HTML is bad" and ignore document types. Please understand that document types mean something. If you're writing HTML 4, you ought to use HTML 4's markup model. You can't just say, "Writing in HTML is a bad habit; use XHTML markup instead" because that advice will be wrong for most of the sites on the web, which still serve up their content as HTML. Use the markup that conforms to the document type.

Cheers,
Tom