HTML and CSS Reference
In-Depth Information
Document Declaration
With so many HTML specifications, how is the web browser supposed to know to correctly
parse the document? The absolute top of any HTML document contains one additional ele-
ment called a DOCTYPE declaration. The DOCTYPE declaration is an instruction found
above the opening <html> tag that tells the web browser what version of HTML the docu-
ment uses. For HTML5 we simply write the following piece of code:
<!doctype html>
The DOCTYPE declaration isn't exactly a tag or an element. As its name states, it is simply
a declaration.
HTML5 has greatly simplified the DOCTYPE declaration, as in previous revisions this was
a very illegible piece of code. The following example is the DOCTYPE declaration for the
HTML 4.01 Strict specification.
<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01 Strict//EN” “”>
If for any reason we don't want to use the HTML5 DOCTYPE, our second choice should be
the HTML 4.01 Strict DOCTYPE. The "strict" part refers to the removal of all the deprec-
ated tags, and it is great for pages that are absolutely correct against the standard.
With that said, our main document structure for the sample CV should look like this:
<!DOCTYPE html>
<meta charset=”utf-8” />
<title>Curriculum Vitae</title>
Search WWH ::

Custom Search