Skip to main content Skip to footer
SevenSpark logo
  • Shop
  • Articles
  • About
  • Help
  • Shop
  • Articles
  • About
  • Help
Login

Invalid doctype

Troubleshooter
Diagnosis
Internet Explorer display problem · UberMenu

If the doctype cannot be properly interpreted by IE, IE will revert to Quirks mode, which will essentially display the site as IE6. The document must have a valid doctype, and it must be the first line in the file.

Details

Background

The doctype lets the browser know what standards your HTML document is following. While most browsers are pretty lenient in this regard, Internet Explorer likes to explode if you haven’t done everything perfectly.

The Problem

If your doctype isn’t properly formatted and detectable, Internet explorer reverts to Quirks Mode, an awful browser rendering similar to IE6. Common causes:

  • Invalid document type – your doctype has to be one of the approved HTML doctypes
  • Missing doctype – your site does not include a doctype
  • Doctype isn’t the first element in the source

If any of the above are true, your site is going to render like it’s 1999 in Internet Explorer.

Identifying the issue

View your source and take a look at the first line. If the doctype declaration is not the first element in the document (before the opening >html< tag), isn’t present, or is malformed, that’s your issue.

The Solution

Make sure that you have a valid doctype and that it is the first line in your HTML.

SevenSpark Logo
Follow on FacebookFollow on XFollow on YouTube

Plugins

  • UberMenu Mega Menu
  • ShiftNav Mobile Menu
  • Bellows Accordion Menu
  • Carbon Copy Menu Duplicator

Resources

  • Articles
  • Tutorials
  • Support Center
  • About SevenSpark

Newsletter

Get exclusive deals by signing up to our Newsletter.

Copyright 2025 © SevenSpark LLC

  • Privacy Settings
  • Privacy Policy
  • Terms of Service
  • Disclaimer