URL: /rules/core/doctype

---
title: "Doctype"
description: "Checks for valid HTML5 doctype declaration"
---

Checks for valid HTML5 doctype declaration

| | |
|---|---|
| **Rule ID** | `core/doctype` |
| **Category** | [Core SEO](/rules/core) |
| **Scope** | Per-page |
| **Severity** | warning |
| **Weight** | 5/10 |

## Solution

Add `<!DOCTYPE html>` at the very start of your HTML document, before the `<html>` tag. This declaration tells browsers to render the page in standards mode rather than quirks mode, ensuring consistent rendering across browsers. Without a proper doctype, browsers may render the page inconsistently.

## Enable / Disable

### Disable this rule

```toml squirrel.toml
[rules]
disable = ["core/doctype"]
```

### Disable all Core SEO rules

```toml squirrel.toml
[rules]
disable = ["core/*"]
```

### Enable only this rule

```toml squirrel.toml
[rules]
enable = ["core/doctype"]
disable = ["*"]
```
