When you look at HTML properly you can see that there are a number of different HTML standards in existance. How does someone just starting out select which of the HTML standards that they should be following?
Well let's start by considering what standards that there are and consider the reasons for not using particular standards. Once we get through all the ones where there are reasons not to use them there will be far fewer different standards to consider in selecting which one that we should use.
To start with the various basic HTML versions are numbered.Those you are likely to see referenced have numbers such as 3.2, 4.0.1, and 5. Now with these numbered versions anything older than version 4.0.1 is an old standard that has been superceded by version 4.0.1. There is no reason for using any version older than HTML 4.0.1 since all of those versions have been superceded by HTML 4.0.1.
What about version 5? Isn't that a newer version than 4.0.1? Well version 5 is a preliminary draft proposal for a new version of HTML to replace the current version and it is still at a very early stage in its development as a standard. It will probably be many years before it is actually formally adopted as the new standard. Until such time as it does become a standard it is all subject to change and how it says to do something now will not necessarily be the way that it says to do it next week. Even once it is adopted as a standard it could be several more years before the browsers all support the new standard and even longer for everyone to upgrade to use those browsers (consider how long browsers such as IE6 continue to be used after new versions that better support the standards were introduced).
For a long time into the future the HTML 4.0.1 standard will therefore be the one that the browsers are designed to primarily support and even after new versions of browsers that support newer versions of HTML are introduced the browsers will still contilue to support HTML 4.0.1 because far too much of the web has been written using it for them to abandon its support.
Having selected HTML 4.0.1 as the "correct" version of HTML to use we then observe that there are actually three different HTML 4.0.1 standards - strict, transitional, and frameset. Now each of these was created to serve a different purpose.
At the time HTML 4 was first introduced using frames was very common on the web and so the frameset standard was defined to allow people to continue to create web sites that use frames. Only the actual frameset page of a web site needs to be created using the frameset standard. As frames have fallen out of favour due to all of the problems associated with displaying web pages using frames the uses for the frameset standard have also fallen. Unless you have a web site that falls into one of the special cases where using frames is appropriate there is no need to bother about the frameset version of the HTML standard. Beginners can be certain that their web site is not going to require frames and so can disregard the frameset standard completely.
The transitional standard was introduced to make it easier for those who had been writing web pages following the HTML 3.2 standard to update to using HTML 4.0.1. The transitional standard allows pretty much everything that the HTML 3.2 standard allowed as well as supporting the newer tags introduced in HTML 4. This means that any web page following the HTML 3.2 standard requires minimal changes in order for it to follow the HTML 4 transitional standard. The transitional standard has a nu8mber of tags and attributes that are considered to be deprecated. Now what deprecated means is dead, obsolete, not to be used, and only still supported in order that pages that already use those tags and attributes can continue to work. When creating new web pages from scratch you should never consider using any of the tags and attributes flagged as deprecated as in every case there is a more appropriate way to achieve the same result using standards that are not deprecated. As a beginner will be writing brand new web pages there is no reason whatever for a beginner to consider using the transitional standard.
By process of elimination we have reduced our list of possible HTML standards that a beginner should follow to one - HTML 4.0.1 strict. The strict standard has done away with all the obsolete tags and attributes that are only in the transitional standard to help people transitioning from HTML 3.2 and only contains those tags and attributes that are actually needed to create web pages. The only possible issue that you might have with the strict standard that might require going back to the transitional standard is that there are some browsers that still do not properly support some of the most advanced of the HTML 4.0.1 tags and attributes (for example Internet Explorer as of version 8 still doesn't properly support the object tag and insists on displaying the content in front of everything else in the page and with a border around it). Sone of te proposed changes for HTML 5 are intended to reintroduce obsolete tags that currently provide a workaround for these browser shortcomings rather that trying to get the browsers to properly support the existing standard.
There is just one alternative that we need to consider and that is XHTML. At the time HTML 4 was introduced XML was just starting to catch on as an ideal common format for storing documents that can be used in a number of different ways. It was therefore considered at that time that web pages too should be created using XML and so XHTML 1.0 was developed as a rewrite of HTML 4.0.1 with just those changes required to make it compliant with XML. Since then XML has really taken off as the document markup language of choice for everything except the web. The problem is that Internet Explorer (as of version 8) still doesn't support XHTML 1.0 properly and in order for an XHTML 1.0 page to work in all browsers it basically needs to follow the HTML 4.0.1 standard with extra slashes at the end of self closing tags. Well that's not entirely true since HTML 4.0.1 lso allows a few tags and other things to be left out that XHTML 1.0 requires but basically an XHTML 1.0 web page with the closing slashes in the self closing tags removed is a valid HTML 4.0.1 page (assuming that you don't use any of the XHTML 1.0 constructs that are not valid as HTML).
Basically what this means is that the only difference between HTML 4.0.1 and usable XHTML 1.0 is that the XHTML 1.0 standard is slightly stricter in how you have to write your code. There is therefore no reason why a beginner should choose to write XHTML rather than HTML.
This article written by Stephen Chapman, Felgall Pty Ltd.