Skip to main content
doctype

doctype

1 7.8
A line at the start of an HTML file that tells the browser which version of HTML to use
  • noun
  • /ˈdɔkˌteɪp/
  • Specialized
: doctype
  • They (and other browser-based email clients) will strip out things like BODY, DOCTYPE, and HEAD tags.

Examples

  • Although the doctype statement in the source says this page is in HTML 4.01, it is definitely a magical Web 1.0 site not updated for more than a decade.

    Blog text (24)
  • As a result, the DOCTYPE declaration at the top of each template is busted.

    Blog text (27)
  • We use the doctype.

    Blog text (20)
  • I was adding my scripts to a SquareSpace version 5 site, which uses the "XHTML 1.0 Strict" doctype, and was seeing the problem.

    Blog text (30)
  • Perhaps on a page with an HTML5 doctype it wouldn't be a problem, though I didn't test that scenario.

    Blog text (30)
  • A proper DOCTYPE declaration informs the browser about the markup version being used.

  • Ensure that the DOCTYPE is correctly placed at the beginning of your HTML document.

  • The DOCTYPE specifies that this document is an HTML5 format, allowing modern features.

Surface Forms

doctype singular
doctypes plural

Morphology

doctype = document + type (semi-transparent) = doc + type

Formally a compound 'document' + 'type', but the clipped form 'doc' may not be obvious to all learners, so derivation is only partly transparent.

Etymology

Doctype is a short form of document ('paper or file') and type ('kind' or 'model'). It started in web coding as a line at the start of a page that tells the browser which version of HTML to use, so the name directly says its job: it names the kind of document.