Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.. :)