Craftora
NoticeMeta Tags

Missing HTML Doctype: How to Fix It

The <!DOCTYPE html> line at the very top tells browsers the page uses modern HTML5.

Quick fix: Start the page with <!DOCTYPE html> so browsers render it in standards mode.

Why it matters for SEO

Without it, browsers switch to "quirks mode" and may render the layout incorrectly.

How to fix it

  1. 1Open the main layout template.
  2. 2Add <!DOCTYPE html> as the very first line, before <html>.

Example

<!DOCTYPE html>
<html lang="en">

Frequently asked questions

Does the doctype affect rankings?

Not directly, but a broken layout can hurt user experience and mobile usability.

Is the doctype case-sensitive?

No. <!doctype html> and <!DOCTYPE html> both work.

Does your website have this issue?

Run a free SEO audit to check this and 40+ other issues in seconds.