Learn HTML or XHTML?
Okay so you want to make a web page and you know that to do this, you've got to learn HTML via some (preferably)
basic HTML tutorials like the ones on this site. But you've heard tell of some kind of other web thingy called
XHTML and you're thinking, "Is that route I need to take?"
Well, in a nutshell, if you want to get into the whole 'web standards' thing where all the web pages you create make an honorable contribution to cleaning up the web and creating a streamlined and homogeneous interoperability for web browser makers and web authors alike, blah blah blah, ad nauseam, think of the children, et cetera, et cetera— then learn XHTML.
On the other hand, if you just want to get a web page up and running that's going to work fine in all major web browsers, no muss, no fuss, standards schmandards, send-me-straight-to-web-developer-hell, I-dont-care— then learn HTML. You'll do just fine. Don't worry about it.
There are some key differences with XHTML with regards to proper nesting of tags, closing all tags, putting all element names in lowercase, etc, that essentially force you to take a more regimental approach to writing up web page code.
Now I know the last paragraph was probably just a bunch of gobbledy-gook technobabble to some of you folks so let me put it this way:
The bottom line is— HTML is more forgiving, easier to learn and is still very much widely in effect.
Moreover, you can produce web pages written in HTML which
do pass the W3C HTML validator (which tests for clean HTML code) and you can even make your web pages easy to maintain and update if you learn HTML in conjunction with
CSS.
So What About Web Standards?
Now mind you, the above is just my opinion. You'll find web standards gurus elsewhere who would take one look at this page (and the virtual blasphemies I've written) and land on me like a sumo wrestler.
Their pro-web-standards arguments would go something along the lines of:
It is our foresworn sacred duty to eliminate all the garbage code soup that has sullied the internet and ultimately make every single web page across the face of the universe perfectly viewable on the tiniest, most advanced and obscure portable web browsing device known to mankind.
Uhhh...
Hmmm... okay...
Sounds like a great idea...
In theory.
Practically speaking though, I just don't see everybody jumping to support these lofty ideals.
In fact, I see some glaring absenteeisms on the ol' web standards bandwagon.
To illustrate, let's take a swipe at some of the big boys on the net (uh oh), namely some of the
W3C members themselves and see how their own home pages measure up in a...
Quick W3C HTML Validation Test
The following W3C members' own home pages were tested in the online
W3C HTML validator to see how clean their web page code was (test conducted on August 23, 2007):
Adobe
http://www.adobe.com/
Failed validation, 24 errors
Creative Commons
http://creativecommons.org/
Failed validation, 35 errors
Google, Inc.
http://www.google.com/
Failed validation, 50 errors (ooops... maybe I should keep my mouth shut about this one...)
Microsoft
http://www.microsoft.com/en/us/default.aspx
Failed validation, 14 errors
Oracle Corporation
http://www.oracle.com/
Failed validation, 30 errors
RealNetworks
http://www.real.com/
Failed validation, 12 errors
Sun Microsystems
http://www.sun.com/
Failed validation, 32 errors
Web3D Consortium
http://www.web3d.org/
Failed validation, 4 errors (okay not bad but still...)
Yahoo, Inc
http://www.yahoo.com/
Failed validation, 34 errors
Well, well!
"Standards?
Standards?? We don't need no stinkin' standards!"
(And seriously folks, most of these guys should know better!)
So HTML vs. XHTML?
Well, ultimately it's your choice.
Now...
Assuming you're going to give XHTML a pass for the moment and you're okay with learning quick and dirty HTML then let's get down to the nitty-gritty of these free tutorials starting with
the basic necessities for web page authoring...