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 Introduction to HTML and CSS HTML Fundamentals Organizing and Grouping

Jess W
Jess W
1,225 Points

First Div not including the h2 Tag?

Just wondering why the first <h2> Spaghetti Carbonara </h2> wasn't wrapped within the first <div> tag? It's just kinda left on its own not in the div. I'm guessing it may have just been a slip up, as the as the other <divs> include the <h3> tags within the div?

1 Answer

Travis Alstrand
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Travis Alstrand
Treehouse Project Reviewer

I believe because the <h1> is in the <header> and would serve as the site's overall main title. The <h2> is appearing as the main heading for the current recipe "Spaghetti Carbonara". This recipe is the main content for this page so in this case it makes sense to have the h2 at the very top of the <main> element.

Having said that, I see what you mean as they wrapped the <p> tag in a div on its own, it's likely they meant to combine the h2 and p into a div together.