<!Doctype> in HTML - HTML Tutorial

doctype in html

Doctype in html

  • The <!Doctype> is declare in HTML document before <html> tag.
  • <!Doctype> is not a HTML tag.It is an instruction to the browsers about what version of HTML page.
  • DTD (Document Type Definition) specifies the rules of markup language, because the browser render the content correctly.
  • Hence HTML5 is not based on SGML(Standard Generalized Markup Language), it does not require a reference to DTD.

Syntax for <!Doctype> declaration :

<!Doctype html>

Difference between HTML 4.01 and HTML5:

HTML 4.01

  • There are three type <! Doctype> declaration in HTML4
  • <! Doctype> refers DTD.


  • There is only one declaration in HTML5.
  • It does not refer DTD.

Sample coding for <!Doctype> declaration:

<!DOCTYPE html>
        <title> Wikitechy </title>
        <h3>Welcome to Wikitechy</h3>
        <p>Students Learning Portal</p>

Code Explanation for <!Doctype> declaration:

Code Explanation for <!Doctype>

  1. < !Doctype html >-defines the version of the HTML document.

Browser Support for <!Doctype>declaration:

Yes Yes Yes Yes Yes

Tips and Notes

  • The <!DOCTYPE> declaration is not case sensitive.
  • To check the HTML Web documents is valid, go to W3C validation service.

Related Searches to Html Doctype

Adblocker detected! Please consider reading this notice.

We've detected that you are using AdBlock Plus or some other adblocking software which is preventing the page from fully loading.

We don't have any banner, Flash, animation, obnoxious sound, or popup ad. We do not implement these annoying types of ads!

We need money to operate the site, and almost all of it comes from our online advertising.

Please add wikitechy.com to your ad blocking whitelist or disable your adblocking software.