Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML HTML Forms HTML Mastery

Add a second level heading inside that div containing the text "Shopping List". No spaces around the text, please.

I can't seem to crack this one. I am not sure what I am doing wrong. Is there a help button or should I just start a discussion?

I first tried just to do a <div> with a simple <h2> etc inside. But doesn't work. Have I forgotten something?

Hi Nete Svane ,

It would be great if you could paste the code you have so far so we can see what's wrong.

Hi Ovidiu

I first had to do a div which was successful! Then I had to add the aforementioned so I put the following inside my div

Shopping List

BUt it is not accepted so I must be missing something??

Do you know what I am missing? Nete

2 Answers

Lachlan Mitchell
Lachlan Mitchell
9,278 Points

Notice that the question is asking you to add a "second level heading inside that div". By wrapping text in second level heading tags, you're specifying that the text inside should be treated as a second level heading. In this case, we're wrapping "Shopping List" inside those tags, and in turn those heading tags should be nested inside the div you just created.

<div>
    <h2>Shopping List</h2>
</div>

Check out this video. It might help you on your way to understanding heading elements. Hope that helps!

  • Akyri

Thank you so much for your help. I was going crazy but it turned out that I was doing it correctly all along but there must be a flaw in the system as it didn't accept it until two days after when I tried it again for the 10th time. Suddenly, it just accepted the answer. It has happened again since with another code but now I know just to keep trying as the system fails from time to time. So my answer was correct all along. THank you anyway to confirm it! NEte

Lachlan Mitchell
Lachlan Mitchell
9,278 Points

Hey Nete!

I just gave it a try and completed it successfully by typing my code directly underneath:

<!-- Write your code below -->

It only took me two pairs of tags, a div and a second level heading. Make sure that you nest your heading inside the div. If it still won't work, post your code here :)

Hi Lachlan,

I first had to do a div which was successful! <div></div> Then I had to add the aforementioned so I put the following inside my div

<div> <h2>Shopping List</h2> </div>

BUt it is not accepted so I must be missing something??

Do you know what I am missing? Nete