To understand HTML5, you need to what HTML4 did and didn’t do.
HTML4 came out in 1999, when the internet was far smaller and simpler than it is now. The web, then, was a set of quite basic hyperlinked documents with basic styling and images. People primarily used the internet to consume text and images. Gradually, what people wanted and expected out of the web changed.
The big thing that HTML5 accomplished was giving a native way for developers to include things like video, audio, games, and smaller things like date and color pickers. Once most of the browsers supported these features, developers could use them without having to include anything extra.
HTML5 also brought a lot of new input attributes. These make forms a lot easier to fill out for users and easier to validate for developers. With HTML5, developers could add a type=”search” or type=”tel” or type=”color” and the input form field would be validated as such. This also makes the web easier to use on mobile devices. If a user on an iPhone comes across an input tag with the type of date, it will change their keyboard accordingly to make it easier to fill out that field. The form fields will also validate in a smarter way and not let people submit forms where there are major obvious errors. Furthermore, developers can use regular expressions to setup their own custom validations.
Another thing that HTML5 did was introduce many new semantic sectioning elements. In HTML4, developers commonly used the div element for just about everything. It was very common to see things like <div id="header"> or <div class="aside">. Rather than using CSS to section a page like this, HTML5 allows for developers to use native HTML elements like <header> <section>, and <aside> to section their pages and write their HTML more semantically (read: in a self-explanatory way). Many of these elements came out from a study
that Google did examining how developers were then using HTML4 + CSS and incorporating most of those workarounds in the native HTML5 spec.
In our comprehensive HMTL/HTML5 training courses you will learn the differences between markup languages and other web programming languages, how to transition from HTML
, and utilize the advanced and emerging features of HTML5 in your web applications.