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 trialSandraLee Rowe
3,637 PointsIm stuck on link and path challenge one.... <!DOCTYPE html> <html> <head> <title>Portfolio Page</title> </head>
<!DOCTYPE html>
<html>
<head>
<title>Portfolio Page</title>
</head>
<body>
<img src="../images/logo.png" alt="Site logo">
<ul>
<li><a href="../../#images">Home</a></li>
<li><a href="../../#images">Portfolio</a></li>
</ul>
<h1 id="../../#images""<portfolio">My Portfolio</h1>
</body>
</html>
2 Answers
Rohald van Merode
Treehouse StaffHey SandraLee Rowe 👋
You're super close on having the image working, currently you're pointing to a folder named images
while the task asks to access the file in the folder named img
. Updating the path to be ../img/logo.png
should make your code pass the first task.
For the second task you'll want to update the href
attribute of the Home link to navigate the user to the index.html
file. You can do this by simply providing it a "/"
, which will redirect the user to the root of your project.
The final task is to link to the portfolio section, you can do this with the #
symbol. As you're not navigating the user to a different file in your project there's no need to use the ../
to change directories 🙂
After these adjustments your code should look like this:
<!DOCTYPE html>
<html>
<head>
<title>Portfolio Page</title>
</head>
<body>
<img src="../img/logo.png" alt="Site logo">
<ul>
<li><a href="/">Home</a></li>
<li><a href="#portfolio">Portfolio</a></li>
</ul>
<h1 id="portfolio">My Portfolio</h1>
</body>
</html>
Hope this helps! If not let us know and we'd be more than happy to elaborate 🙂
SandraLee Rowe
3,637 PointsThank you so much for helping me.