Has DocType Tag records whether RankGear finds a document type declaration in a page’s HTML — returning 1 when a <!DOCTYPE string is present and 0 when it is not. It is a presence check only: a match confirms a doctype exists, not that the declaration is valid, correctly placed, or that the surrounding markup conforms.
| Factor ID | RG-TEC-005 |
|---|---|
| Family | Tech & platform |
| Measurement | Boolean presence (0 / 1) |
| Measured zone | Rendered HTML without scripts |
What it measures
Has DocType Tag indicates whether RankGear recognizes a document type declaration on the page. A modern doctype signals to browsers that the document should be rendered in standards mode, which produces more predictable layout and box-model behavior than the quirks mode triggered when a declaration is missing.
How RankGear measures it
RankGear searches the script-free HTML case-insensitively for a string that begins with <!DOCTYPE and ends at the next >. If such a string is found the factor scores 1; otherwise it scores 0. The check does not validate the declaration, inspect its placement in the document, or assess overall HTML conformance — it only confirms that a matching string exists.
What RankGear looks for
<!doctype html> ← modern declaration, standards mode
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> ← older, still matches| Value | Meaning |
|---|---|
| 1 | A <!DOCTYPE…> string was found in the script-free HTML. |
| 0 | No document type declaration was found. |
How to optimize it
Place the modern <!doctype html> declaration at the very beginning of every HTML document, before any ordinary markup. Validate your templates so the declaration is emitted exactly once and ahead of the opening tag. Treat this as a baseline hygiene check rather than a lever to push: the goal is a correctly declared, standards-mode page, not a higher number.
Important considerations
- Presence of a doctype does not prove the page is valid HTML.
- A malformed or obsolete declaration can still match, since the check is a string search rather than a validation.
- The doctype supports predictable rendering, not keyword relevance — it is a hygiene signal, not a content one.
- Test generated pages, not only a single template, so every rendered output carries the declaration.
- This factor tracks a measurable property that relates to position within a measured result set; it is a prioritization signal, and its presence does not by itself cause or guarantee a ranking.
Related factors
Part of the Factors reference · how RankGear measures · glossary.