Invalid html privacy page.
View html source for Googles privacy page :
<!DOCTYPE html> <html lang="en"> <meta charset="utf-8"> <title>Google Privacy Center</title> <link rel="stylesheet" href="//www.google.com/css/privacy.css"> <h1><a href="/"><img src="//www.google.com/intl/en/images/logo_sm.gif" alt="Google"></a> Privacy Center</h1> I noticed that there is no body tag or footer here. It also does not end </html> .
Is this valid markup?
HTML5 (this is what they declare this page to be) allows you to omit a lot of things. For example, the start and end tags of the body tag are optional, as are the html ( ref ) end tags.
The validator says it is valid , but HTML5 validator support also remains experimental. Ymmv
The validation page from validator.w3.org says that it is valid HTML5.
But note that Google doesn’t really care if their pages are valid markup or not if they display correctly. The main Google page (google.com) is riddled with invalid markup.
HTML allows you to omit specific start and / or end tags :
Some types of HTML elements allow authors to skip end tags (for example,
PandLIelement types). Several element types also allow you to skip start tags; e.g.HEADandBODY. The HTML DTD indicates for each element type whether a start tag and an end tag are needed.
If you examine a document type definition similar to HTML 4.01 , the elements are declared by declaring the <!ELEMENT … > elements . And in such element declarations, two characters indicate whether the element’s start or end tag can be skipped. See Definition P , for example:
<!ELEMENT P - O (%inline;)* -- paragraph --> Here - after the element name, P means that a start tag is required, and O means that the end tag can be omitted. Another example: HEAD element :
<!ELEMENT HEAD OO (%head.content;) +(%head.misc;) -- document head --> Here, two O indicate that both the start and end tags can be omitted.
Omitting both tags on elements is possible only if such elements are implicit in their context. In the case of HEAD the content model of the parent HTML element is specified as follows:
<!ELEMENT HTML OO (%html.content;) -- document root element --> Where the html.content parameter object is defined as follows:
<!ENTITY % html.content "HEAD, BODY"> This means that the HTML content model is implicitly defined as HEAD followed by BODY .
You can look at the HTML 4.01 element index to see which tags might be omitted.
Reading W3C HTML5 Specification Syntax Tag Exception :
The start tag of a body element can be omitted if the element is empty, or if the first element inside the body is not a space character or comment, if only the first inside the body element has a script or style. The end element of the body tag may be omitted if the body element does not immediately follow the comment.
The end tag of an html element may be omitted if the html element is not followed by a comment.
It's funny that the editor of the document is Ian Hickson of Google, Inc.
If you run it through the W3C validator , you will receive This document has been successfully verified as HTML5! .
Yes it is HTML5
http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.google.com%2Fintl%2Fen%2Fprivacy.html