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 trialRyan Canty
Courses Plus Student 5,665 PointsSet the <img> element's src attribute to a path that goes one level out of the current folder and inside a folder named
Cant really figure this one out.... any advice?
<!DOCTYPE html>
<html>
<head>
<title>Portfolio Page</title>
</head>
<body>
<img src=".../img" alt="Site logo">
<ul>
<li><a href="">Home</a></li>
<li><a href="">Portfolio</a></li>
</ul>
<h1 id="portfolio">My Portfolio</h1>
</body>
</html>
9 Answers
Jason Anello
Courses Plus Student 94,610 PointsHi Ryan,
You're on the right track but you only need 2 dots to go up one level from the current folder.
Also, you need to keep the filename that was there so it can still find the image file.
So you would need another forward slash after img
and then the filename that was there when you started.
Abinet Kenore
10,082 Points<img src="../img/logo.png" alt="Site logo">
Dipika Purohit
Courses Plus Student 20,955 Points<img src=".../img" alt="Site logo">
Ary de Oliveira
28,298 PointsChallenge Task 1 of 3
Set the <img> element's src attribute to a path that goes one level out of the current folder and inside a folder named img.
We'll done! Ary great...
<!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</a></li>
</ul>
<h1 id="portfolio">My Portfolio</h1>
</body>
</html>
Ary de Oliveira
28,298 PointsChallenge Task 3 of 3
Set the "Portfolio" link to navigate to the section of the page with the id portfolio.
<!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="#portfolio">Portfolio</a></li>
</ul>
<h1 id="portfolio">My Portfolio</h1>
</body>
</html>
Milton Vasquez
6,818 Pointsit works : <img src="../img/logo.png" alt="Site logo">
Ary de Oliveira
28,298 PointsChallenge Task 2 of 3
Set the "Home" link to a root-relative path that navigates to index.html.
<!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="">Portfolio</a></li>
</ul>
<h1 id="portfolio">My Portfolio</h1>
</body>
</html>
HIDAYATULLAH ARGHANDABI
21,058 Points<!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</a></li>
</ul>
<h1 id="portfolio">My Portfolio</h1>
</body>
</html>
Pushpa Dhakal
8,804 Points<!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</a></li>
</ul>
<h1 id="portfolio">My Portfolio</h1>
</body>
</html>
Shane Rosales
1,745 PointsShane Rosales
1,745 PointsI got it. Thank You
Jason Anello
Courses Plus Student 94,610 PointsJason Anello
Courses Plus Student 94,610 PointsHi Shane,
Did you have the complete filename which was "logo.png"?
It's looking for a path like this "../img/logo.png"
That's saying to go up one level, then down into the "img" folder and then access the logo.png file that is in that img folder.
Shane Rosales
1,745 PointsShane Rosales
1,745 PointsThat doesn't seem to work either
Jason Anello
Courses Plus Student 94,610 PointsJason Anello
Courses Plus Student 94,610 PointsYour earlier comment says you got it. Is everything ok now?
Shane Rosales
1,745 PointsShane Rosales
1,745 PointsYes I got it. Thank you