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 trialAlain Dwight
Front End Web Development Techdegree Graduate 21,669 Pointscorrect index link is <a href="/index.html"> yet <a href="/index.html#portfolio"> does not link to <h1 id="portfolio">?
Am I wrong or is the challenge malfunctioning?
<!DOCTYPE html>
<html>
<head>
<title>Portfolio Page</title>
</head>
<body>
<img src="../img/logo.png" alt="Site logo">
<ul>
<li><a href="/index.html">Home</a></li>
<li><a href="/index.html#portfolio">Portfolio</a></li>
</ul>
<h1 id="portfolio">My Portfolio</h1>
</body>
</html>
1 Answer
Steven Parker
231,248 PointsThe instructions say, "Set the "Portfolio" link to navigate to the section of the page with the id portfolio."
And "the page" it is referring to is the current page, not the index page that the other link goes to.
Alain Dwight
Front End Web Development Techdegree Graduate 21,669 PointsAlain Dwight
Front End Web Development Techdegree Graduate 21,669 PointsThanks, sounds like a bit of both then, since "the page" is index. ;)
Steven Parker
231,248 PointsSteven Parker
231,248 PointsWell, we don't know it's the one at root level, but you have a good point! You might want to submit a bug report to the Support folks about that.
Alain Dwight
Front End Web Development Techdegree Graduate 21,669 PointsAlain Dwight
Front End Web Development Techdegree Graduate 21,669 PointsCouldn't hurt, although that last hole you poked in my reasoning could well frame the question as including a test of general reasoning (indeed, I stumbled and now have learned - and I've studied plenty of logic).
Still, not sure if that was the intended or ideal scope of the question!
Steven Parker
231,248 PointsSteven Parker
231,248 PointsI tested it, and a relative reference does not pass the validation either. But while it should work, it would involve a page reload where the accepted solution does not. So it might help clarify the task to add something like "... on the current page without reloading." to the instructions.