+ 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.
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).
+ 17
I don't think so
+ 9
An HTML document can only have one html tag and one body tag.
+ 6
Not possible.
+ 3
only one {body}
+ 3
Because body, head, html, are basic code you can not write again
+ 1
No you can’t have more than 1 body tag.
+ 1
only one tag body and one tag head.
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