Don ' t forget to add a doctype
Add what?
There are actually many types of HTML: html4.01strict, HTML4.01 Transitional, XHTML1.0 Strict, and so on. These types of HTML define their respective specifications, but they also define a machine-readable language that defines the specification, the elements and attributes of HTML.
This type of definition is referred to as the "document type definition", or "DTD".
Some tools that work with HTML documents may need to know which DTD (x) HTML documents to use: This is why each (x) HTML document needs to define the DTD at the beginning. For example:
<! DOCTYPE HTML Public "-//W3C//DTD XHTML 1.0 strict//en" "HTTP://WWW.W3.ORG/TR/XHTML1/DTD/XHTML1-STRICT.DTD" >
In view of its syntax, DTD declarations are often referred to as "Doctype".
Why?
Why would you want to specify a document type? Because he defines what version of your (X) HTML document you typically use. This is a vital information that requires tools to process documents.
For example, specifying your document type allows you to use like markup validator to check your (X) HTML syntax. If they don't know what kind of document you're using, they won't work.
The DOCTYPE of HTML