Can I use HTML5 doctype?

Comments (0)

HTML 5

The short answer is yes. Just don't go implementing all the new features before the final release. Also check your site validates under the new doctype.

HTML5 Doctype

<!DOCTYPE html>

You will probably notice that its much smaller than previous doctypes. There is a very good reason for this, browsers will look at this and switch to standards compliant mode even if they don't support HTML5.

You should also add the following between the <head></head> tags:

<meta http-equiv="content-type" content="text/html; charset=UTF-8">

A good example of a site already using HTML5 doctype is Google.

Things to think about..

Although you can use the doctype now, it's not a great idea to start using the new tags and features. This is because HTML5 is still a work in progress and as such things may change before final release.

Using the new tags in a development or test environment is a much better idea. This way you can get to know the new features of HTML5 without worrying about future changes breaking your live sites.

Its also worth noting that IE currently has almost non existent support for the new features in HTML5. Other major browsers such as Firefox, Opera, Safari and Konqueror all support HTML5 to varying degrees.

Example of one of the new features

This is a nice example of the new canvas tag. It allows graphics and media to be shown using only HTML and JavaScript. This will mean plugins such as Flash and Java will no longer be required for some web applications. Also note as mentioned above, this example wont work with IE and some other browsers. Use Firefox if you have trouble.

Your browser does not supported this feature. Browsers that do are listed below.

Supported browsers: Opera, Firefox, Safari, and Konqueror.

Credit goes to ROBO Design for the example code.

My view and use of HTML5

I have decided to change this site to HTML5 for now and see how it goes. I am going this way so I am able to use the new tags in examples and still have valid markup. My code will still be validated with the latest XHTML as well. This is to ensure the quality of the code as I am still using XHTML style of layout and tags. I wouldn't however use HTML5 on any non personal/developmental projects.

This has the potential to be a big thing for web standards and an easier, more logical way of coding. This would allow less experienced designers to create better markup and remove the excuse of experienced developers that are avoiding valid code due to growing complexity of previous markup models.


Comments

This article hasn't been commented yet.

Write a comment

* = required field

:

:

:

:



Back to top