HTML and CSS Reference
In-Depth Information
There are a number of features that we should stop to discuss here.
Firstly, at the very top of the webpage, the
DOCTYPE
is simply:
<!DOCTYPE html>
//
The
DOCTYPE
is an important signal to browsers and allows them to interpret
the content of the document in the context of the rules associated with the docu-
ment type. If this is omitted the browser will revert to its traditional rule set, and
this may produce very different results.
You will also notice that there is no version number attached to
html
in the
DOCTYPE
.
HTML should now be considered a living standard rather than a versioned standard with
official releases, and this is reflected in the
DOCTYPE
. For this reason many people ob-
ject to the term HTML5 entirely: it is just HTML.
The other thing you may notice about the
DOCTYPE
declaration is that it does not contain
a reference to a Document Type Definition (DTD) document defining the rules of the
markup language. This is a pleasant change for developers who may be accustomed to copy
and pasting
DOCTYPE
declarations such as:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
or