To learn XHTML or not?

Soldato
Joined
18 Jan 2007
Posts
19,845
Location
Land of the Scots
So the internet has been telling me for near 10 years that XHTML is the future and anything new should be coded using it.

As I don't design websites for other people anymore so I don't need to meet any arbitrary standards is there any need to learn XHTML now? I've always figured browsers are going to be using HTML for some time if not forever so I'll learn it if I ever need to.

I'm pretty old-school and still code my websites from a blank notepad, are there any advantages or benefits I'm missing out on?
 
tbh if you know html then learning the new xhtml standards will not take you long.

It's always worth keeping up changes as they happen as 4-5 years down the line, things might have changed a lot and you will find yourself quite far behind.

I use Notepad++ for my coding, excellent tool :)
 
I think you're overcomplicating the matter.
Simply put, xhtml is html except that it's more strict and depending on the level, some tags are deprecated.

In html, there is nothing wrong with the following:
<Img Src="something.jpg">

With xhtml however, it should look like this:
<img src="something.jpg" alt="Alt Text"/>

All lower case, alt included and the tag is self closed.

If you know html, it should take all of 10 minutes to learn what you need to change in order to validate as xhtml.
 
XHTML is merely HTML but adhering to the rules of a XML document.

For instance <br>, whilst valid in HTML is not valid in XHTML. Because in an XML document every element must be closed. It expects a closing tag, e.g. </br>. Or the short-hand notation of simply <br />.

There's a few deprecations and other subtle differences by really, the above, is the most significant difference.
 
Hmm, as mentioned, XHTML is merely a more strict version of html. It wont take long to adapt and you will probably find that you do half of it already.

A lot of these terms that get bandied about by the non-tech savvy can confuse the hell out of you if you are not current in your knowledge. People love dropping terms like XHTML, dynamic, certified etc into spiels about websites to make punters think they are getting something that isn't standard.
 
As far as I'm aware, it's been shelved by the body that develops it, so I doubt it's 'the future' despite its merits.
 
I thought XHTML has merged into the HTML5 standard so they are kind of one and same the thing these days?....

What NathanE said sums up HTML5 as well. You can code in two different ways HTML or using XML rules and both are totally valid. It's just down to preference which you use.

Whereas XHTML2, which people thought would be the future of the internet has been shelved completely now.
 
Thanks for the input guys, I guess the main thing that made me think it is hard is when I run normal HTML through the XHTML validator and it comes up with a million errors, but that's a silly way to look at it...

I think I'll give it a go and see how easy it is to recode some of my simpler projects in XHTML see how it works out... I think the major problem is that I'm still a table whore!
 
Thanks for the input guys, I guess the main thing that made me think it is hard is when I run normal HTML through the XHTML validator and it comes up with a million errors, but that's a silly way to look at it...

I think I'll give it a go and see how easy it is to recode some of my simpler projects in XHTML see how it works out... I think the major problem is that I'm still a table whore!

This is definitely the problem. :)

Once you've taken the time to drop the bad habits of designing with tables, you'll be able to make much better websites, that are easier to update and quicker to create.
 
Thanks for the input guys, I guess the main thing that made me think it is hard is when I run normal HTML through the XHTML validator and it comes up with a million errors, but that's a silly way to look at it...

You don't even need to use XHTML (ie self-closing tags) if your document is marked correctly. For example, the following will kick up an error on W3C if you use <br/>:

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

I think I'll give it a go and see how easy it is to recode some of my simpler projects in XHTML see how it works out... I think the major problem is that I'm still a table whore!

There's your problem. Learn CSS :).
 
1. seperate content from presentation
- use semantic markup (e.g. lists of links)
- use external css files

2. test
- in all major browsers

passing the validator isn't important, the validator has flaws, although you shouldn't ever have more than a handful of errors.
if you want to read a book, read Designing With Web Standards by Jeffrey Zeldman.
 
2. test
- in all major browsers

BTW for testing in IE dl IETester. It has the render engine for 5.5+ so you can test and fix all of IE 6 and 7's lovely differences which will drive you insane :p Although IE8 seems to be fine with everything i have done recently, thank god ;)
 
That test drive program doesn't seem to work correctly for me, if i run it in IE8 mode I get different results than if I loaded it up in IE8 itself.
 
Back
Top Bottom