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:

<!DOCTYPE html>

For example, we have given below a small HTML5 code snippet for creating a simple web page with doctype declaration:

<!DOCTYPE html>
    <title>HTML5 page title</title>
    HTML5 page content

S Ghosh

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>