+ 3

Can the <html>, the<body> and the <head> be omitted in HTML5?

Omitting <html>, <body> and <head>?

16th Jan 2018, 10:41 AM
Erick Michael
Erick Michael - avatar
2 Answers
+ 6
Omitting the html, head, and body tags is certainly allowed by the HTML specs. The reason is that browsers have always sought to be consistent with existing web pages, and the very early versions of HTML didn't define those elements. When HTML 2.0 first did, it was done in a way that the tags would be inferred when missing. See this code :- https://code.sololearn.com/WNf8OOQgTzcu/#html
16th Jan 2018, 11:23 AM
Akash Pal
Akash Pal - avatar
+ 2
Thanky you very much
16th Jan 2018, 2:02 PM
Erick Michael
Erick Michael - avatar