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 trialAvery Pierce
1,869 PointsI do not have a way of saving the other files. Can anyone assist me with how to open files on this exercise?
https://teamtreehouse.com/library/html-basics-2/going-further-with-html/links-and-paths-challenge
<!DOCTYPE html>
<html>
<head>
<title>Portfolio Page</title>
</head>
<body>
<img src=../img.png></img>
<ul>
<li><a href="">Home</a></li>
<li><a href="">Portfolio</a></li>
</ul>
<h1 id="portfolio">My Portfolio</h1>
</body>
</html>
Avery Pierce
1,869 PointsI 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
Front End Web Development Techdegree Graduate 84,738 PointsIn 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.
Avery Pierce
1,869 PointsThank you so much sir, that was a Great help!
Brendan Whiting
Front End Web Development Techdegree Graduate 84,738 PointsBrendan Whiting
Front End Web Development Techdegree Graduate 84,738 PointsWhich files do you want to open?
This challenge wants you do change the
src
andhref
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.