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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Lauren Sithole Gadyadza](https://secure.gravatar.com/avatar/b535ba67f6e6d9438f1d499255ccbe71?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Lauren Sithole Gadyadza
6,659 Pointscode challenge: structuring content challenge
Challenge Task 4 of 4 Finally, place the top <ul> inside an element that represents a major section of navigation.
Bummer: Make sure the header element wraps the ul, h1 and p elements at the top of the page.
index.html
<!DOCTYPE html>
<html>
<head>
<header></header>
<section>
<link href="styles.css" rel="stylesheet">
<title>My Portfolio</title>
</head>
<body>
<header>
<nav>
<ul>
<li><a href="#">About</a></li>
<li><a href="#">Work</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
</header>
<h1>My Web Design & Development Portfolio!</h1>
<p>A site featuring my latest work.</p>
<h2>Welcome</h2>
<p>Fusce semper id ipsum sed scelerisque. Etiam nec elementum massa. Pellentesque tristique ex ac ipsum hendrerit, eget feugiat ante faucibus.</p>
<ul>
<li><a href="#">Recent project #1</a></li>
<li><a href="#">Recent project #2</a></li>
<li><a href="#">Recent project #3</a></li>
</ul>
</section>
<footer> <p>© 2017 My Portfolio</p> <p>Follow me on <a href="#">Twitter</a>, <a href="#">Instagram</a> and <a href="#">Dribbble</a></p> </footer> </body> </html> Preview
Student Perks A collection of special discounts and exclusive offers available for Treehouse students.
Treehouse BlogShop TreehouseAbout TreehousePrivacy PolicyTerms & Conditions© 2019 Treehouse Island, Inc.
Am stucck please help, where am I wrong and where must be put the nav and/section to represent a major section of navigation.
<!DOCTYPE html>
<html>
<head>
<header></header>
<section>
<link href="styles.css" rel="stylesheet">
<title>My Portfolio</title>
</head>
<body>
<header>
<nav>
<ul>
<li><a href="#">About</a></li>
<li><a href="#">Work</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
</header>
<h1>My Web Design & Development Portfolio!</h1>
<p>A site featuring my latest work.</p>
<h2>Welcome</h2>
<p>Fusce semper id ipsum sed scelerisque. Etiam nec elementum massa. Pellentesque tristique ex ac ipsum hendrerit, eget feugiat ante faucibus.</p>
<ul>
<li><a href="#">Recent project #1</a></li>
<li><a href="#">Recent project #2</a></li>
<li><a href="#">Recent project #3</a></li>
</ul>
</section>
<footer>
<p>© 2017 My Portfolio</p>
<p>Follow me on <a href="#">Twitter</a>, <a href="#">Instagram</a> and <a href="#">Dribbble</a></p>
</footer>
</body>
</html>
3 Answers
![Ryan Dudley](https://uploads.teamtreehouse.com/production/profile-photos/1627472/micro_avatar.jpg)
Ryan Dudley
Treehouse Project ReviewerYou are very close! However, there are a few tags that seem to be misplaced.
Step 1:
You need to move the closing tag for the <header>
to encompass the <nav>
, <h1>
, and <p>
elements. So that would look like this:
<header>
<nav>
<ul>
<li><a href="#">About</a></li>
<li><a href="#">Work</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
<h1>My Web Design & Development Portfolio!</h1>
<p>A site featuring my latest work.</p>
</header>
Step 2: There is a extra <header></header>
element on line 4 that needs to be removed. The opening <section>
tag also needs to be moved further down, just above the <h2>Welcome</h2>
element.
<head>
<header></header> <!-- This line needs to be removed -->
<section> <!-- This needs to be moved -->
<link href="styles.css" rel="stylesheet">
<title>My Portfolio</title>
</head>
Step 3: As mentioned above the opening <section>
tag needs to be moved just above the <h2>
element, directly after the closing tag for the <header>
like so:
<section>
<h2>Welcome</h2>
<p>Fusce semper id ipsum sed scelerisque. Etiam nec elementum massa. Pellentesque tristique ex ac ipsum hendrerit, eget feugiat ante faucibus.</p>
<ul>
<li><a href="#">Recent project #1</a></li>
<li><a href="#">Recent project #2</a></li>
<li><a href="#">Recent project #3</a></li>
</ul>
</section>
I hope this was able to help, and if you have any further questions do not hesitate to ask!
![Richard Verbraak](https://uploads.teamtreehouse.com/production/profile-photos/10708861/micro_ether.jpg)
Richard Verbraak
7,739 PointsIt seems like you forgot to wrap the h1 and the p at the top of the page inside the header.
It should look like this:
<header>
<nav>
<ul>
<li><a href="#">About</a></li>
<li><a href="#">Work</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
<h1>My Web Design & Development Portfolio!</h1>
<p>A site featuring my latest work.</p>
</header>
The <nav> is in the right place though!
![eck](https://uploads.teamtreehouse.com/production/profile-photos/111095/micro_8516739396_bcc0fa09dd_b.jpg)
eck
43,038 PointsHey Lauren. I took a look at the HTML you shared and the challenge you are working on and think I have figured out what doesn't line up.
First thing, you HTML has a few HTML formatting issues:
-
<header></header>
tags in the<head>
element should be deleted. -
<section>
tag in the<head>
element should be deleted. - There is currently a closing
</section>
tag under the second<ul>
element, as expected, but you need that opening<section>
tag above the<h2>Welcome</h2>
element as one of the requirements of the challenge.
That last thing you will need to do to met the requirements of the challenge is move the first <h1>
and <p>
into the <header>
element, as this is the requirement for the first step of the challenge.
Hope this helps!