html5 - What can be validly placed between </body> and </html>, if anything? -


i lot of requests clients, of whom working ad agencies , seo firms, insist on having kinds of tags , scripts placed after </body> , before </html>. thought inappropriate, asked quit often. people become upset , demanding when code insert not explicitly between 2 closing tags.

is in way acceptable html practice? if so, why? , benefit provide?

no published html specification allows tags between </body> , </html>, because body element may appear last child of html element. defined content model of html element.

what allowed there depends on html version, permissive version in respect, html5 cr, allows (by general rules on content models) “inter-element whitespace, comment nodes, , processing instruction nodes”.

if put elements between </body> , </html>, browsers treat them appearing @ end of body element. is, ignore </body> tag. (if put elements after </html> tag, browsers interpret them being in body. </html> tag has no impact, really.)

putting between </body> , </html> pointless risk, since browsers could behave differently, , nothing should prevent putting elements before </body> tag.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -