Element

html

Error Type

Known

Guidelines

  • BITV 1.0 (Level 2)
    Guideline GroupLevel 1
    Guideline Subgroup3.2 Create documents that validate to published formal grammars.
  • WCAG 1.0 (Level AA)
    Guideline GroupPriority 2
    Guideline Subgroup3.2 Create documents that validate to published formal grammars.

Requirement

HTML content has a valid doctype declaration.

Error

doctype declaration missing.

Short Description

Each document must contain a valid doctype declaration.

How To Repair

Add a valid doctype declaration to the document.

Steps To Check

Procedure

1. Check for the presence of a doctype declaration at the start of the document.
2. Check the content of the doctype declaration.

Expected Result

1. HTML content has a valid doctype declaration.

Failed Result

1. Add a valid doctype declaration to the document.

Examples

Pass Examples

Does have a doctype declaration.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=UTF-8" />
<title>OAC Testfile - Check #29 - Negative</title>
</head>
<body>
</body>
</html>

Fail Examples

Does not have a doctype declaration.
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=UTF-8" />
<title>OAC Testfile - Check #29 - Positive</title>
</head>
<body>
</body>
</html>
Web site engine's code is copyright © 2023
Inclusive Design Institute