Doctype is web standard from HTML3 onwards. HTML3, HTML4, XHTML and HTML5 have doctype declaration. HTML5 Based Doctype is smaller than HTML4 and XHTML based doctypes. No need to specify the DTD and html version.
HTML5 Doctype is also known as DTD Less Doctype.
<!DOCTYPE html> <html> <head> <title>Title Of The Html5 Document</title> </head> <body> This content Of The Html5 Document...... </body> </html>
DOCTYPE is the first thing which should be present in an HTML5 document.
HTML5 doctype is written as <!doctype html>
'DOCTYPE' keyword is not case sensitive. So, <!doctype html> or <!DOCTYPE html>, both will do.
HTML5 doctype does not reference to a DTD. This is because, html5 is a SGML based, unlike HTML4.01 or XHTML1.