+ 5

Can we have multiple body tags in single html file

Is it possible to add two or more body tags in one html file.

14th May 2019, 5:02 AM
Mohit Patil
Mohit Patil - avatar
9 ответов
+ 6
As every programming language has a syntax, HTML has one too (without even being a programming language). The syntax doesn't allow more than one root tag each (html, head, body).
15th May 2019, 10:48 PM
Kainatic [Mostly Inactive Now]
Kainatic [Mostly Inactive Now] - avatar
+ 17
I don't think so
15th May 2019, 8:30 AM
Nour Abu Assaf
Nour Abu Assaf - avatar
+ 9
An HTML document can only have one html tag and one body tag.
14th May 2019, 5:36 AM
Mr AJX 😎😈
Mr AJX 😎😈 - avatar
+ 6
Not possible.
14th May 2019, 5:02 AM
Sonic
Sonic - avatar
+ 3
only one {body}
14th May 2019, 3:56 PM
Abduo Saber
Abduo Saber - avatar
+ 3
Because body, head, html, are basic code you can not write again
14th May 2019, 3:58 PM
Abduo Saber
Abduo Saber - avatar
+ 1
No you can’t have more than 1 body tag.
14th May 2019, 8:10 PM
William
+ 1
only one tag body and one tag head.
11th Jun 2019, 1:18 AM
Edwin Boada
Edwin Boada - avatar
0
When 2 body tags are present inside HTML, both of them will be rendered, i dont know why. Link to pen -> https://codepen.io/ajinspiro/pen/OJroaRb Tested in firefox and chrome at 2023 10 03
3rd Oct 2023, 1:48 PM
Arun Kumar A.J
Arun Kumar A.J - avatar