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

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

code not passing please help <div> <h2>shopping list</h2> </div>

7 Answers

Mike Morales
Mike Morales
19,833 Points

Asa - Great job on your coding with the h2 element. The first h2 element you coded looks great! On the other hand, the question is asking you to put the h2 element inside the opening and closing div tags that you created in challenge one, which was to create a div anywhere on the page. But make sure your div has an opening and closing tag it is done the same way as your opening and closing h2 tags. Hopefully, you have figured it out by now but if not, I am more than happy to help you out. Keep up the good work!

<div> <h2>shopping list</h2> </div>

Anthony Osborn
Anthony Osborn
17,095 Points

I struggled with this one as well as I was forgetting to capitalize the L in List as in Shopping List. My code was actually fine but Treehouse needs to give more prompts to let you pass!

So code between the divs needs to be

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

<div> <h2>shopping list</h2> </div>

Is this correct

Mike Morales
Mike Morales
19,833 Points

What's the name of the course you are working on? On the other hand, were you able to figure out your code?

<h2>Shopping List</h2>  
<h2> shopping list </h2>

The first line is correct i think

my code doe not work.. i have div tags and h2 tags... what do I do

Mike Morales
Mike Morales
19,833 Points

Richie -

I'm assuming your working on the same question Asa was working on, right? You need to place your h2 heading inside your opening and closing div tags.

Yes, thanks Mike.. :)