Changes in HTML 5 - <!DOCTYPE html> Declaration

What's new in HTML 5

There is no DTD in HTML 5. Therefore, the <!DOCTYPE html> tag should never contain a PUBLIC FPI and preferably should not include a SYSTEM identifier either. If the SYSTEM identifier is specified, the value should always be about:legacy-compat.

Differences between HTML 5 and earlier versions of HTML

In HTML 5, there is no more transitional DOCTYPE, which allowed deprecated presentational elements to be included in the HTML code. In previous versions of HTML the separation of content from presentation using the strict DOCTYPE with style sheets was optional. Going forward, web developers should always use style sheets.

The new <!DOCTYPE html> declaration is much simpler and easier to remember. The PUBLIC and SYSTEM DTD identifiers should be removed from these declarations:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN" "http://www.w3.org/TR/html4/strict.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

HTML pages that include a DTD (DOCTYPE definition) in the document type declaration as shown above may be interpreted as one of the older (1997, 1999, 2000 or 2001) versions of HTML or, worse yet, using quirks mode. Once the PUBLIC FPI and DTD identifiers have been removed, the pages should only be interpreted as HTML 5 standards mode documents.