Am I best off learning XHTML & CSS2 getting used to basics, then picking up HTML5 & CSS3 or should I start with HTML5/CSS3 straight away?

Much better to start with HTML and CSS2, as the others are really just additions to that, rather than a whole new thing. And both HTML5 and CSS3 are still in development and changing all the time, so not very reliable at this stage. They are nice icing on the cake, as it were, but icing with no cake is not much use.

Much better to start with HTML and CSS2, as the others are really just additions to that, rather than a whole new thing. And both HTML5 and CSS3 are still in development and changing all the time, so not very reliable at this stage. They are nice icing on the cake, as it were, but icing with no cake is not much use.

There is very little difference between HTML 4 and XHTML 1.0 so learning either one is effectively the same thing (the differences are not significant until you actually serve the XHTML as XHTML instead of HTML and that doesn't work in IE8 and earlier).

HTML 5 recognises that these are that close to the same thing by incorporating both in (X)HTML 5.

XHTML and HTML are basically the same thing. You can just get away with being a little more sloppy with HTML than XHTML, but no one says you have to be sloppy. For example, XHTML insists that you close tags like </li>, which you can get away with not doing that in HTML. But I do it anyway, so there's no difference ... except that in XHTML you have some extra closing slashes that I find ugly, such as <img scr="" alt="" <font color='"#FF0000"'>/</font>>.

The other problem with XHTML is that most Microsoft browsers don't actually support it (from IE8 and backwards). So you just have to serve it up as HTML anyway. There's a useful thread comparing them here:

Given that HTML5 is on the horizon, I consider XHTML to be a dead-end street (even though there's an acknowledgement of its rules in HTML5). Its usefulness was that it encouraged better coding practices—something that will be sorely needed with HTML5, which has gone back to allowing sloppy code.

Coding that way indiccates a lack of understanding of the difference between HTML and XHTML. The space before the slash is needed if you are writing HTML for Netscape 4 using the XHTML rules. XHTML doesn't need that space and all browsers more recent than Netscape 4 don't need it even when the page is still served as HTML.

Given that HTML5 is on the horizon, I consider XHTML to be a dead-end street (even though there's an acknowledgement of its rules in HTML5). Its usefulness was that it encouraged better coding practices—something that will be sorely needed with HTML5, which has gone back to allowing sloppy code.

Case in point why W3C should be disbanded. Killing XHTML was a stupid a** decision.

The space before the slash is needed if you are writing HTML for Netscape 4 using the XHTML rules. XHTML doesn't need that space and all browsers more recent than Netscape 4 don't need it even when the page is still served as HTML.

Thanks felgall. I kind of had an inkling from somewhere the space was no longer needed, but, having long forgotten about xhtml, I haven't reformed (until now ).