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 trialArif Ar
Courses Plus Student 3,717 Pointswhy this is wrong
I dont get why this answer is wrong. They are saying -- Place the content between the header and footer (h2, p and ul)
<!DOCTYPE html>
<html>
<head>
<link href="styles.css" rel="stylesheet">
<title>My Portfolio</title>
</head>
<body>
<header>
<ul></ul>
<h2></h2>
<p></p>
</header>
<ul>
<li><a href="#">About</a></li>
<li><a href="#">Work</a></li>
<li><a href="#">Contact</a></li>
</ul>
<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>
<h2></h2>
<p></p>
<ul></ul>
</section>
<p>© 2017 My Portfolio</p>
<p>Follow me on <a href="#">Twitter</a>, <a href="#">Instagram</a> and <a href="#">Dribbble</a></p>
<footer><p></p></footer></body>
</html>
3 Answers
KRIS NIKOLAISEN
54,972 PointsThe <section> tag is right for task 3. I apologize for the sloppy indentation but the final code should be:
<!DOCTYPE html>
<html>
<head>
<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>
<h1>My Web Design & Development Portfolio!</h1>
<p>A site featuring my latest work.</p>
</header>
<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>
<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>
So all the content between <header></header> and <footer></footer> is enclosed by <section></section>
KRIS NIKOLAISEN
54,972 PointsYou have to go back to the beginning. Even though the challenge let you pass task 1 and 2 it shouldn't have. When you get to task 3 then you see the fail and you can't continue until you fix the previous two tasks. That's why I said it is broken.
Task 1 should be:
<header>
<ul>
<li><a href="#">About</a></li>
<li><a href="#">Work</a></li>
<li><a href="#">Contact</a></li>
</ul>
<h1>My Web Design & Development Portfolio!</h1>
<p>A site featuring my latest work.</p>
</header>
Task 2 should be:
<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>
You have the solution tags right but instead of creating new elements to place them around, place your tags around the existing elements
Arif Ar
Courses Plus Student 3,717 Pointsread my comment on your first answer thanks for the help
KRIS NIKOLAISEN
54,972 PointsPersonally I think the challenge is broken since it should stop you from the get go. But you have to get to task 3 or 4 or who knows before the error checking kicks in. When the task 1 instructions state:
Place the ul, h1 and p elements at the top of the page inside an element that represents a group of introductory content.
your solution should enclose the existing elements:
<ul>
<li><a href="#">About</a></li>
<li><a href="#">Work</a></li>
<li><a href="#">Contact</a></li>
</ul>
<h1>My Web Design & Development Portfolio!</h1>
<p>A site featuring my latest work.</p>
not create new ones. If you start over and keep that in mind for all the tasks you should pass.
Arif Ar
Courses Plus Student 3,717 Pointsthanks for your time. but what you posted here is the existing code given in the question. i am taking about your answer. I posted the code above <header> <ul></ul> <h2></h2> <p></p> </header>
which you can is inside the header section which is fine. Error are working fine for each question. i dumbfounded by this may be i am missing some thing. it is third question
Arif Ar
Courses Plus Student 3,717 Pointsi am kinda surprise. I told what you did in your second answer and it worked that's why i upvoted. I want to accept this answer as correct answer as in logic this is correct answer. but in the question they said section should be in between header and footer. that's i placed it around here --- <section> <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>
please change your answer so i can accept or let me know if i am wrong thanks for your time