Welcome to the Monastery | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
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. It's practically verbatim off the W3C site. XHTML is HTML's successor Yes, exactly. More specifically, XHTML is HTML4's successor. 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? At the time of this writing, XHTML2 is not current yet; it is still at the working draft stage. XHTML 1.1 is the current version of HTML, and most folks are still writing XHTML 1.0. (On the whole, writing XHTML 1.0 is not a big problem, because converting it to XHTML 1.1 or 2.0 or 2.2 or whatever later will be easy. In contrast, converting HTML 4.x to XHTML is painful and difficult.) If you're writing HTML 4, you ought to use HTML 4's markup model. Yes, but HTML4 allows closing non-empty tags such as li and p (li, specifically, being what we were talking about closing upthread); doing so does conform to the doctype; and doing so builds good habits -- because you will presumably not be writing only HTML4 forever. (Other good habbits you should develop, even when writing HTML4, include putting quotes around all attribute values, putting no spaces between the attribute name, the equal sign, and the value, and using the entity and attribute names in lowercase. These changes, perfectly acceptable in HTML4, form habits that will help you when you write XHTML.) Frankly, in almost all cases, you shouldn't still be writing HTML4 now (i.e., should not be using legacy doctypes if you can avoid it), because it makes things hard to maintain, since SGML lacks a concept of wellformedness, among other things. (XML in a very real sense is the successor to SGML in an analogous sense to XHTML being the successor to earlier HTML versions.) As you point out above, it is safer and saner to use modern markup doctypes. In reply to Re: PerlMonks has changed me
by jonadab
|
|