<!doctype> is a special tag which is declared in the very beginning of a web page before <html> tag. It sends an instruction to the web browser about the version of HTML. <!DOCTYPE> is not a HTML tag and most of the modern browsers support this tag declaration. As HTML5 is not based on SGML, so no DTD reference is required in <!DOCTYPE> declaration. This tag is also very useful for SEO.
An example of typical HTML5 doctype tag declaration is shown below:
For example, we have given below a small HTML5 code snippet for creating a simple web page with doctype declaration:
<!DOCTYPE html> <html> <head> <title>HTML5 page title</title> </head> <body> HTML5 page content </body> </html>