Element

html

Error Type

Known

Guidelines

  • Stanca Act
    Guideline GroupRequirement 1: Conform To Specifications

Requirement

Strict doctype is declared.

Error

Strict doctype is not declared.

Short Description

A 'strict' doctype must be declared in the document. This can either be the HTML4.01 or XHTML 1.0 strict doctype.

How To Repair

Insert a 'strict' doctype declaration at the start of the document.

Repair Example

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

Steps To Check

Procedure

1. Check the document type declaration (DTD) in the document.
2. The DTD must be either one of the following:
3.
4.

Expected Result

1. The document contains a 'strict' doctype declaration.

Failed Result

1. Insert a strict doctype declaration in the document.

Examples

Pass Examples

The document contains an HTML 4.01 strict DTD.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=UTF-8" />
<title>Testfile - Check #225-2 - Negative</title>
</head>
<body>
<p><img src="rex.jpg" alt="A black and brown cat named Rex."/></p>
</body>
</html>

Fail Examples

The document does not contain a DTD.
<html lang="en">
<head>
<title>Testfile - Check #225-1 - Positive</title>
</head>
<body>
<p><img src="rex.jpg" alt="A black and brown cat named Rex."/></p>
</body>
</html>
Web site engine's code is copyright © 2023
Inclusive Design Institute