Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: PerlMonks has changed me

by jonadab (Parson)
on Sep 03, 2005 at 10:22 UTC ( [id://488895]=note: print w/replies, xml ) Need Help??


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

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.

Replies are listed 'Best First'.
Re^2: PerlMonks has changed me
by tmoertel (Chaplain) on Sep 03, 2005 at 16:00 UTC
    It's practically verbatim off the W3C site.
    Please understand that I am not saying the initialism "XHTML" does not expand into the words "Extensible Hypertext Markup Language." Rather, I am pointing out that Extensible HTML "is" HTML no more than a horseless carriage "is" a carriage. The first replaces the second, and even through Horseless Carriage 1 seems a lot like Carriage 4, drivers ought to know whether they are driving an automobile or a horse and act accordingly.

    The reason I keep responding to your posts is because I want people reading this thread to recognize that document types mean something: they define a document's content model and markup rules, and they ought to be understood and respected. That's why I have a problem with your "build good habits" advice:

    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.)

    Your advice suggests that authors can turn off their brains and just write XHTML markup because it is always the "good" thing to do, which isn't true. While "write XHTML always" might work for today's stage of the HTML-to-XHTML transition, it won't work in general.

    Rather, I would encourage readers to cultivate the following habit, which truly is good: Always know what type of content you are creating and always use the content model and markup rules associated with that specific type.

    Cheers,
    Tom

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://488895]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-03-28 19:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found