What version of HTML to use?

I had done little code in the last 5+ years. Naturally the first step is to know which version of HTML to use. Probably the most common version today is 4.01 transitional and HTML 5 had a few years to go or this is what I thought.

HTML5 had talked about for a long time, so I should check out the status of HTML5. But I did not really look forward to learning a new standard.

Wow, was I wrong. HTML5 already had 20% of the market.

Status of HTML versions:

  In December 2012 the penetration was: 
XHTML 1.0 55%
HTML5 20%
HTML 4.01 10%
  By September 2013 the penetration was: 
XHTML 1.0 40%
HTML5 40%
HTML 4.01 5%

4.01 is a very sloppy code and I was glad to see it going away.

As for learning a new standard, I had been using XHTML strict for years, which was nice and clean. Finding out that the transition from XHTML to HTML5 was very easy since HTML5 took its ground work by using XHTML. Updating was almost as easy as changing the first line of the file.

So now to look at HTML5. I quickly found out that HTML5 had a long way from full standard. But then finding out that they had taken XHTML, made a few modification and started to move forward. Hence using most of XHTML standards on a page, you could quickly move to HTML5.

There are a lot of new markup elements. Basically HTML5 is XHTML on steroids. Note that there are a few XHTML tags that have been deleted.

The stable version of 5.0 is planned to be released in 2014.

Browser Readiness

Now comes the problem. A lot of browsers have not caught up with the standard. Most will still work, but will not render to the intended standard.

A good example of this in in a form where you ask for a date. Right now only Opera comes up with a calendar. Others work, but you end up with a dialog box to enter the date. There is an exception to this, and this is Internet Explorer which some people still use. Unless you have the very newest Internet Explorer, I am told that thinks can get ugly.

Problems With Help Web Searches

When looking for examples of how to do a problem, I ran into an example shortage. What makes this a real problem is that there are a lot of examples, but using obsolete methods. Old examples get the job done by using Java Script. So a lot of searching needs to take place. So far I have avoided all use of Java Script and any client side script.

Previous: My Experiences with HTML5, Part 1, Introduction

Next: My Experiences with HTML5, Part 3, Cascading Style Sheets 3