Tidy 37

From Htmlpedia
Jump to: navigation, search

Tidy: SYSTEM, PUBLIC, W3C, DTD, EN must be upper case

Cause:

A DOCTYPE Declaration is mandatory for most current markup languages and without one it is impossible to reliably validate a document. The DOCTYPE defines the version of the document like : HTML 4.0.1, XHTML 1.0, 1.1, ... Certain Parts of this declaration must be written in upper case

Examples:

Bad
<!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" lang="en" xml:lang="en">
<head>
<title>XHTML-document</title>
</head> ...
Good
<!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" lang="en" xml:lang="en">
<head>
<title>XHTML-document</title>
</head> ...


Bad
<!doctype html public "-//w3c//dtd html 4.01 Transitional//en" 
  "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<title>HTML-document</title>
<head> ...
Good
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
  "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<title>HTML-document</title>
<head> ...

Solution:

Ensure that the correct parts of the DOCTYPE declaration are written in upper case.

References: