The doctype declaration

<!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
Press CTRL+D to bookmark this page - The doctype declaration

2 Responses to <!doctype>

  1. Md Imtiaz Islam says:

    First of all,
    I would like to thank the admin of this site for making concept of HTML5 more easier to all of us. Your procedure of giving lesson/tutorial is quite satisfied. But we have some problems at the time of coding. So for making us better understood, attach a trial-HTML-editor in your site where we can make our example of coding & have an instant result.
    Thanks again.

Your comment


3 + 1 =