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

HTML HTML Basics Going Further with HTML Links and Paths Challenge

I do not have a way of saving the other files. Can anyone assist me with how to open files on this exercise?


<!DOCTYPE html> 
    <title>Portfolio Page</title>
    <img src=../img.png></img>
      <li><a href="">Home</a></li>
      <li><a href="">Portfolio</a></li>                
    <h1 id="portfolio">My Portfolio</h1>
Brendan Whiting
.a{fill-rule:evenodd;}techdegree seal-36
Brendan Whiting
Front End Web Development Techdegree Graduate 84,734 Points

Which files do you want to open?

This challenge wants you do change the src and href attributes of a some elements to point to files. But you don't need to view these other files in order to do this work, you just need to code the right references to them. If the instructions aren't clear what those references should be let me know.

I think they went over my head. I did see where there was (src=..) is suppose to bring up the next file. I do not know how to open up that file on the practice to actually perform or execute this and complete it. Do you have any suggestions? I'm going to go back and review the whole section.

2 Answers

Brendan Whiting
.a{fill-rule:evenodd;}techdegree seal-36
Brendan Whiting
Front End Web Development Techdegree Graduate 84,734 Points

In Challenge Task 1 of 3 they give us this instruction: "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."

This is what the img element looks like now:

<img src="logo.png" alt="Site logo">

So right now this is going to show an img element, and the source of that img element is at this path: "logo.png". This means they're pointing to a file "logo.png" that lives in the same folder as the index.html file we're looking at right now.

But the challenge is saying that image isn't actually there. So if this page was rendered, it might not show the right image. They want us to look one folder above the current folder, in another folder called "img". So we need to change the path to reflect this: : "../img/logo.png". The "../" here means one folder up. So the new img element would look like this:

<img src="../img/logo.png" alt="Site logo">

We can't actually look at the folder structure of these files. We just have to take their word for it that these files and folders are how they say they are.

Thank you so much sir, that was a Great help!