This tutorial help you to understand the Syntax of HTML5 Look at the below sample html code
<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”>
Doctype: type of the document we are loading in this case HTML Public: it tells that standard is publicly available
HTML4.0:Tells the version of the HTML and this mark up is written in english W3c.com/strict.dtd:This url points to the file that identify this standard
And now what is the new Doctype for HTML5 you may think just replace html4.0 with html 5.0
No your wrong New doctype is simply
Simple and easy.No need to write complex doctype from now on wards. You may think why they removed dtd also.I will come to that point mean while we will see other changes
<meta http-equiv=”content-type” content=”text/html; charset=UTF-8″>
And the new one is
Much simpler than earlier. And All browsers including old browsers already understand this and you can use it any page it will work perfectly
And the new HTML5 document is
<!DOCTYPE html > <html> <head> <meta charset=UTF-8"> <title>Arunkumar ‘s blog</title> <link rel="stylesheet" href="example.css"> <script src=" example.js"></script> </head> <body> <h1>Welcome to My blog</h1> <p> Join my site to know about Web </p> </body> </html>
How it works in old browsers with new doctype meta etc?
And from now onwards no versions in html we call it HTML language as simple as that.
And without DTD ?
HTML used to be based on a standard called SGML, and that standard required both the complex form of the doctype and the DTD.
The new standard has moved away from SGML as a way to simplify HTML language and make it more flexible.
And you know many of the browsers just CHECKS ONLY HTML in doctype to ensure that they are parsing HTML document. So it is not a problem.
Still have doubt goto w3c validator or click here to check html validity