HTML5 is not only a new version of HTML language enriched with new elements and attributes, but a set of technologies for building more powerful and diverse websites and applications, that support multimedia, interact with software interfaces, etc.
Benefits
- HTML5 is supported by all modern browsers.
- HTML5 is more device friendly. It is easy to use.
- HTML5 can help creating attractive websites with CSS, JavaScript, etc.
- HTML5 supports SVG and other virtual graphics.
- The code becomes cleaner mainly due to replacing div tags with Semantic elements, which help better structure content of the web page and improve readability.
- HTML5 supports geolocation, which makes it possible to determine the users’ location.
- The new standards were specified for playing multimedia directly in the browser without having to install additional plug-ins.
- Support for web storage introduced in HTML5 makes it possible to store large amounts of application data locally, without affecting your web application’s performance.
- The data in local storage will persist even when the user’s browser is closed and reopened
HTML <!DOCTYPE> Declaration
Doctypes for earlier versions of HTML were longer because the HTML language was SGML-based (standand Generalized Markup Language) and therefore required a reference to a DTD, (Document Type Definition) but they are obsolete now.
With HTML5 this is no longer the case and the doctype declaration is only needed to enable the standard mode for documents written using the HTML syntax.
<!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
</head>
<body>
The content of the document……
</body>
</html>