Tag <!DOCTYPE> is aimed for indicating the type of the active document DTD (document type definition). It is necessary for browser to understand how to interpret the active web page because HTML exists in several versions, moreover there is XHTML (EXtensible HyperText Markup Language), and it differs from it in syntax.

The upper level element indicates the upper level element in the document, it is tag <HTML> for HTML.
Publicity the object is public (the value PUBLIC) or system resource (the value SYSTEM), like a local file.
Registration informs that DTD developer is registered in ISO (International Organization for Standartization). It accepts one of two values: plus (+) – developer is registered in ISO or minus (-) developer is not registered.
Organization – the unique title of organization, which had developed DTD. HTML/XHTML publics W3C officially, this title is also written in <!DOCTYPE>.
Type the type of the document, which is described. The value for HTML/XHTML is indicated by DTD.
Name the unique name to describe DTD.
Language – the language the text is written in for describing the object. Consists of two letters, and it is written in upper case. The English language is indicated for HTML/XHTML document (EN).
URL the address of the document with DTD.
Closing Tag
Is optional.

Internet Explorer requires the <!DOCTYPE> to be located in the first line of the code. Otherwise the browser moves to quirk mode.
File upload form
Email form generator
WordPress contact form
Form builder