doctype-first
Doctype must be declared before any non-comment content. Comments and whitespace are allowed before the DOCTYPE declaration.
Level: Error
Config value
Section titled “Config value”- true: enable rule
- false: disable rule
The following patterns are not considered rule violations
Section titled “The following patterns are not considered rule violations”<!DOCTYPE html><html></html>
<!-- Comment before doctype --><!DOCTYPE html><html></html>
The following patterns are considered rule violations
Section titled “The following patterns are considered rule violations”<html></html>
<div>Content before doctype</div><!DOCTYPE html><html></html>