Validates as HTML5 despite no <body> tag

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Validates as HTML5 despite no <body> tag

Richard J. Hodgkiss
Dear Sir,

While trying to convert a web page to HTML5, I accidentally
deleted the <body> tag:
http://www.succulent-plant.com/families/dicotyledons2.html

However, the validator repeatedly passes the page as correct HTML5.

Regards,

Richard Hodgkiss



-- 
"He who does not work shall not eat"
Vladimir Ilyich Lenin 'The State and Revolution' 1917

 ____________________________________________________________________
|
|  Dr. Richard J. Hodgkiss
|  Email:  [hidden email]
|  Direct Dial: +44-(0)208-422-9942
|
|  Home Page
|  http://www.succulent-plant.com/rjhodgkiss.html
|
|  The Succulent Plant Page:
|  http://www.succulent-plant.com/
|____________________________________________________________________
Reply | Threaded
Open this post in threaded view
|

Re: Validates as HTML5 despite no <body> tag

Steve Faulkner-2
The body element is not required in HTML5 under certain circumstances
refer to Tag omission in text/html:
http://www.w3.org/TR/html5/sections.html#the-body-element

note if you look at the DOM you will find the browser has added a body element even though absent in the source code

--

Regards

SteveF
HTML 5.1

On 5 May 2015 at 17:59, Richard J. Hodgkiss <[hidden email]> wrote:
Dear Sir,

While trying to convert a web page to HTML5, I accidentally
deleted the <body> tag:
http://www.succulent-plant.com/families/dicotyledons2.html

However, the validator repeatedly passes the page as correct HTML5.

Regards,

Richard Hodgkiss



-- 
"He who does not work shall not eat"
Vladimir Ilyich Lenin 'The State and Revolution' 1917

 ____________________________________________________________________
|
|  Dr. Richard J. Hodgkiss
|  Email:  [hidden email]
|  Direct Dial: <a href="tel:%2B44-%280%29208-422-9942" value="+442084229942" target="_blank">+44-(0)208-422-9942
|
|  Home Page
|  http://www.succulent-plant.com/rjhodgkiss.html
|
|  The Succulent Plant Page:
|  http://www.succulent-plant.com/
|____________________________________________________________________

Reply | Threaded
Open this post in threaded view
|

Re: Validates as HTML5 despite no <body> tag

Jukka K. Korpela
2015-05-05, 20:09, Steve Faulkner wrote:

> The body element is not required in HTML5 under certain circumstances

The body *element* is always there. The start and end *tags* <body> and
</body> may (almost always) be omitted in HTML serialization of HTML5.

> refer to Tag omission in text/html:
> http://www.w3.org/TR/html5/sections.html#the-body-element

Indeed it is about *tag* omission, not about *element* omission. The
detailed rules are somewhat complicated, but they mean that the tags may
be omitted except in some rather special situations. (The omission may
have impact on the construction of DOM nodes as regards to space
characters, but this is normally irrelevant.)

Yucca