<p> tags inside <h1> tags

I’m on lesson 8 in the HTML basics, and am wondering why I get the ‘Oops’ message when submitting a header1 tag WITHOUT a paragraph tag inside. I thought it was not correct to have paragraph tags inside the top header?

Thanks for advising.

And ok, I just noticed when using the examples, it actually applies in the question so it looked all stupid and made no sense. Hope this corrected version works.

never nest paragraphs in headings (<h1></h1>) and vice versa

if you edit/update your question, leave a reply so i get a notification. Your code is not visible, take the following steps to make your code visible:

select your code and press ctrl + k (or cmd + k if you use a mac)

if this instructions are unclear, you can also insert 3 backticks before and after your code, like so:


the backtick is located above the tab key on your keyboard

Super swift reply!
That’s what I thought, never nest paragraphs in headings (<h1></h1>)
That is why I am surprised the code only gets accepted as correct when I do. (If I delete them, I get a 'did you remember all your <p> tags - message.)

And thanks for the cmd + k tip, makes it much easier to ask a question!

i was online, you where lucky i replied so swiftly.

Yea, but the problem is that SCT (submission correctness test)(the script that checks your code) is not airtight, sometimes faulty code comes through, which is a problem (become so people believe SCT is airtight), you should just add your paragraph below your heading:

<h1>i am heading</h1>
<p>i am a paragraph</p>

That’s such a shame though, it could lead to bad habits right from the beginning. But good to know! Thanks again.

i know, it can. But that is the problem, it is impossible to cover every corner case if you want to allow creativity, the other option you have is to set it so tight you need an exact match (which is also not fun). Codecademy choose the first option