HTML (Hypertext Markup Language) is responsible for structuring content on the web, using the simple tags it contains we have been able to present a diverse network of websites from eCommerce sites to blogs through to more simple static sites.
HTML has been evolving from the very start with HTML5 being the latest addition. So isn’t it time we draw that line and take advantage of the new possibilities that HTML5 has in store for us today?
I will not be discussing every little detail HTML5 has to offer, it’s past the scope of this article and would consist of a 500 page book!
But I will talk about the more common specifications of the language that we can start implementing today with no big hassles. After all the only way the language can continue to evolve and the web sites we build can become more functional is if we start implementing it.
The first improvement from HTML5 is the doctype (document type declaration) which prior to HTML5 used to be an ugly line of code that was difficult to remember. It ended up resulting in a quick search to get your hands on the correct doctype or if you were using a HTML editor it would normally be put in for you. It used to look something like this:
This has now been changed and includes just 15 characters (including the space) simply:
Nice and simple, now I think we can all manage to remember that one.
The next significant change is within the head element. This has also been stripped down to the bare minimum. You used to have to declare numerous meta tags within the head element looking something like this:
HTML5 has improved on this by keeping it simple and removing the unnecessary attributes:
A quick note but an important one – to make sure all browsers render the character encoding in the meta tag correctly the entire character encoding declaration must come within the first 512 characters of your document! So if you are finding issues this could be a reason, I would hope however your head element is never this far down the page!
HTML5 comes with some new common elements like