[wp-hackers] WordPress, web standards, and (X)HTML

Computer Guru computerguru at neosmart.net
Tue Dec 5 09:06:30 GMT 2006


I know my blog doesn't validate - I don't have time for it :)

My main site, however, is:
http://validator.w3.org/check?uri=http%3A%2F%2Fneosmart.net%2F

HTML 4 is ancient. If you go with HTML 4, when (in the future obviously) IE
and the rest of the world becomes XHTML-compliant, you're going to have to
do a lot of work just to make it work with XHTML.

HTML 4 has many issues, it's not as strict (even HTML 4.01 STRICT), and
there is no point to *going back to it* after already switching to
XHTMl-compliant code.

AS a matter of fact though, EVEN if you were to use HTML 4.01 strict, *XHTML
STILL VALIDATES*
Here:
http://validator.w3.org/check?uri=http%3A%2F%2Fneosmart.net%2F&charset=%28de
tect+automatically%29&doctype=HTML+4.01+Strict

Basically, revalidating my XHTML-compatible homepage as HTML 4. The only
error is the XML-descriptor at the top - something that HTML doesn't use.

So if XHTML is 100% backwards-compatible with HTML 4 - why the hell would
you take a giant step back and make it ONLY compatible with HTML 4 and kill
off XHTML compatibility?


I had "innerHTML" hell with my main site, until I figured out how to fix
that stuff.

That ENTIRE article you linked me to has absoloutely nothing to do with our
topic. All it says, basically, is that it's "wrong" because it won't
necessarily be 100% compatible when you change the mime type to XHTML. 

Read it carefully. The Executive Summary is a perfect explanation:

 1. Authors write XHTML that makes assumptions that are only valid for
    tag soup or HTML4 browsers, and not XHTML browsers, and send it as
    text/html. (The common assumptions are listed below.)

 2. Authors find everything works fine.

 3. Time passes.

 4. Author decides to send the same content as application/xhtml+xml,
    because it is, after all, XHTML.

 5. Author finds site breaks horribly. (See below for a list of
    reasons why.)

 6. Author blames XHTML.


We have number 1 down just fine, and 2, and 3.
So long as you *don't* do number 4, ABSOLOUTELY NOTHING WRONG OR BAD OR
HARMFUL HAPPENS.

That's the important thing. There is NO DISADVANTAGE in using XHTML and
sending it as HTML. It's an article that tries to make a problem out of
nothing. Or at least you're inferring the wrong stuff from it. The ONLY
PROBLEM is when you try to send it as XHTML. So long as your sending it as
HTML (as we're doing), there are NO issues.

The only real issue in that article:

* XHTML documents that use the "/>" notation, as in "<link />" have
   very different semantics when parsed as HTML4. So if there was to
   be a fully compliant HTML4 user agent, it would be quite correct to
   show ">" characters all over the page.

   For more details on this see the third bullet point in the section
   entitled "The Myth of "HTML-compatible XHTML 1.0 documents".


Which is correct. But as they said, only a "fully compliant HTML4 user
agent" and there is none. Every single browser out there (I've checked)
understands and circumvents this on its own.

My point is, HTML4 is old and decrepit. Whether in a year or 5, we *will*
switch to pure XHTML. Using HTML4 now simply means having to do a lot more
work later. If we can continue to use our XHTML-as-HTML implementation
without problems (this is all "theoretical" problems in the here and now, no
actual, real-world issues) and ease the transition later, whyever not?

One more thing: the author of that document couldn't have made more clear
his/her personal feelings about XHTML:
* HTML 4.01 contains everything that XHTML 1.0 contains, so there is
   little reason to use XHTML in the real world. It appears the main
   reason is simply "jumping on the bandwagon" of using the latest and
   (perceived) greatest thing.


Obviously the author thinks XHTML is useless and a "fanciful" standard. BS.
As is mentioned, this document WAS WRITTEN IN 2002!!! THINGS CHANGE.

Today, XHTML *IS* correct. Browsers have improved. They won't render this
stuff wrong. XHTML is the way to go, and HTML4 is dead. Think about it -
2002?! 


(erm.. I kinda got carried away, please, no offense intended to anyone
pushing this idea on the list... I just feel strongly about taking huge
steps backward :)

-----

Computer Guru
NeoSmart Technologies
http://neosmart.net/blog/


> -----Original Message-----
> From: wp-hackers-bounces at lists.automattic.com [mailto:wp-hackers-
> bounces at lists.automattic.com] On Behalf Of Sam Angove
> Sent: Tuesday, December 05, 2006 10:03 AM
> To: wp-hackers at lists.automattic.com
> Subject: Re: [wp-hackers] WordPress, web standards, and (X)HTML
> 
> On 12/5/06, Computer Guru <computerguru at neosmart.net> wrote:
> >
> > Why would you settle for something less? I'm seeing this question
> being by
> > those wanting a change, but again, if there is no real, tangible
> *HARM* in
> > sending out 100% XHTML-valid content as HTML, and indeed, only good
> comes
> > out of it compared to sending out HTML 4.01 (YUCK!), why the hell
> not?
> >
> > What's wrong with having 100% compliant XHTML, sending it as HTML,
> and
> > waiting for the rest of the world to *actually support* XHTML
> mimetypes
> > before changing the header?
> 
> Firstly, the message that started this thread linked to some posts
> explaining why sending XHTML with the wrong content-type header is
> evil. See, for example, "Sending XHTML as text/html Considered
> Harmful":
> 
>    http://www.hixie.ch/advocacy/xhtml
> 
> I'll also point out that the Neosmart blog front page is currently
> neither valid nor well-formed.  If you were to change the
> content-type, it wouldn't render. It also uses Prototype, some parts
> of which use the innerHTML property and are therefore incompatible
> with XHTML. You will *not* be able to flick a switch and change the
> content-type without breaking the page -- exactly the problem that the
> "Considered Harmful" piece warns about.
> 
> Secondly, just to turn this around on you, what are your reasons for
> not wanting to use HTML 4.01 Strict? ("YUCK!" was not informative.)
> Why do you think XHTML-as-text/html is better?
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers



More information about the wp-hackers mailing list