Bug in the "Learn Basic HTML" project?

I’ve just joined and am doing the first few tasks in the “Learn Basic HTML” project. I’ve got to the one where you start using tags. I mistakenly put my opening (main) tag at the very top (see below) - BUT - the error the test reports is “The opening main tag should come before the first paragraph tag.” - which it does and this confused the hell out of me for ages until I found a video on YouTube that showed the same code but with the (h2) tag at the top.

Why is the test reporting this error when that isn’t the problem in my code ?


<main>

<h2>CatPhotoApp</h2>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

<p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>

</main>

“The opening main tag should come before the first paragraph tag” in this case means an opening p tag is the next element after the opening main tag. The following code would pass:

<main>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

<h2>CatPhotoApp</h2>

<p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>

</main>

although you should not have <h2> inside <main> if you follow the instructions

In this case, “The opening main tag should come before the first paragraph tag.” means it should come immediately before the paragraph tag.