0

Html challenge question

I was playing the html challenge and it asked can you have two body tags in one document. I knew that you can so i answered true. It marked me wrong. Now I know that you aren’t supposed to have two body tags but it does work at least here in sololearn playground. Is there a way someone can change it either say how many body tags are there suppose to be instead can there be?

18th Mar 2025, 3:30 AM
Zvi
Zvi - avatar
5 Antworten
+ 4
Zvi "The <body> HTML element represents the content of an HTML document. There can be only one <body> element in a document." https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body While browsers might allow it, it's technically illegal ..
18th Mar 2025, 6:25 AM
Bob_Li
Bob_Li - avatar
+ 3
Can you show the original question Screenshot via Post or code, so that we can check it
18th Mar 2025, 4:41 AM
Alhaaz
Alhaaz - avatar
+ 2
rules are just guidelines, actually. deviating from rules happens everywhere. compilers, browsers, os, cpu... they all behave a bit differently from an idealized specification. Everyone wants to be different.
19th Mar 2025, 12:53 AM
Bob_Li
Bob_Li - avatar
+ 1
Bob_Li Thanks. But that’s crazy! In my mind rules that can’t/arnen’t enforced are merely suggestions.
18th Mar 2025, 6:56 PM
Zvi
Zvi - avatar
0
Only if my opponent takes the challenge, otherwise it will disappear like most challenges…
18th Mar 2025, 4:44 AM
Zvi
Zvi - avatar