The HTML5 standard was finalized and released in 2014, and it is what Html should have been when the first version was launched all those years ago. HTML 2.0 was the first true ‘standard’, published all the way back in 1995. Two years later, HTML 3 was published. Another two years later, HTML 4.01 was introduced and it has been the work horse of the internet since then.
The first ‘working draft’ of HTML5 was introduced way back in 2008, with surprisingly broad browser support back then. The HTML5 that we know today is widely different from the HTML of the past, and here we are going to discuss just what the latest standard changed with its release. Since HTML5 was launched, it has been widely accepted and all its features and capabilities are now supported by all major browsers. There are still a few hiccups here and there, but overall HTML5 has assimilated well with the modern online experience.
As a web developer, you could either be an old pro who has mastered the older standards or a newbie curiously watching the development of new standards on the sidelines. Either way, you have to eventually begin transitioning over to HTML5.
HTML Vs HTML5 Infographic
The first step to transitioning to HTML5 or learning is to understand the difference between the older standard and the latest one. Here are some key differences between HTML and HTML5:
HTML5 is a living language
HTML5 is a living language, a work in progress. It is amazing to see what HTML5 can do, but it is also important to know that HTML5 is not a fully standardized version like HTML4, which is more than ten years old and a set standard, unchangeable.
If you are getting into HTML5, you will have to make some updates. Attributes and Elements are added and regularly modified every year. This also depends on how much you use rich elements, but it is definitely one of the risks involved when using a fluid, changing language like HTML5.
HTML5 is simpler
While HTML5 does have risks like constant updates, it is generally easy to keep up with the changes and updates because of the simpler syntax as compared to HTML4. For instance, you have a very simple declaration at the start of the page to set it as an HTML5 page:
The simple Doctype declaration is one of the simplifications made in the HTML syntax, which is compatible with all versions from HTML4 and all the way back to XHTML1. However, HTML5 is not compatible with SGML.
The New
HTML5 comes with a number of new elements and eliminates several others (which we will cover in a while), but one of its key added elements is
The
It’s important to specify an id attribute as well as width and height for defining the canvas size. You can add a style attribute to define borders.
You can use JavaScript as well, like the following example:
var c = document.getElementById(“myCanvas”);
var ctx = c.getContext(“2d”);
ctx.fillStyle = “#FF0000”;
ctx.fillRect(0,0,150,75);
The new and
Another big addition that HTML5 comes with are the new and