Elements
HTML
Doctype
Doctype, or document type declaration, declares the version of the HTML document.
<!DOCTYPE top-element availability "registration//organization//type label//definition language" "uniform-resource-locator">
| Name: | Default: | Description: |
| top element | html | specifies the top-level element |
| availability | PUBLIC | specifies whether the formal public identifier (FPI) is a publicly accessible object or a system resource |
| PUBLIC specifies a publicly accessible object | ||
| SYSTEM specifies a system resource, such as a local file or URL | ||
| registration | + | specifies whether the organization is registered by the International Organization for Standardization (ISO) |
| + specifies registered | ||
| - specifies not registered | ||
| organization | specifies the OwnerID, a unique label indicating the name of the organization responsible for creation and maintenance of the DTD | |
| type | DTD | specifies the public text class, the type of object being referenced |
| label | HTML | specifies the public text description, a unique descriptive name for the public text being referenced |
| definition | specifies the document type definition (DTD) | |
| Strict specifies non-depreciated and non-frame elements and attributes | ||
| Transitional specifies depreciated and non-frame elements and attributes | ||
| Frameset specifies depreciated and frame elements and attributes | ||
| language | EN | specifies the public text language, the natural language encoding system used in the creation of the referenced object |
| uniform resource locator (URL) | specifies the location of the referenced object |
Doctype must occur at the start of the HTML document.
HTML 4
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN">
Strict:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
HTML 4.01
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
Strict:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
Transitional:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Frameset:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
XHTML 1
Strict:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Transitional:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Frameset:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
XHTML 1.1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
XHTML Basic 1.1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">
HTML5
<!DOCTYPE html>
