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

Deep Dive: Websites part 2

I'm having issues with jumping out of the folder as in "going back" from a page in one folder back to its original folder. i followed the steps and i left my original index on the desktop how the files were originally. everything worked from clicking the link to the new folder but going back did not work!????

5 Answers

The way it works is that you have to put your images in the correct folder relative, to your HTML file.

Here's an example:

file directory structure example

Does that help?

If not, you can read up about absolute vs relative paths

<!doctype html>
<html lang="en">
 <head>
    <meta charset="utf-8">
    <title>My Page</title>
 </head>

 <body>

    <p>Our First Page</p>

    <a href="my_directory/another_page.html">My Link</a>

 </body>
 </html>
<!doctype html>
<html lang="en">
 <head>
    <meta charset="utf-8">
    <title>My Page</title>
 </head>

 <body>

   <p>Another page</p>

   <a href="../links/deepdive.html">Go Back</a>

 </body>
 </html>

That's not my issue my issue is when I make my go back button it doesn't bring me back out when I click it

in the video he says to get back to the file you type"../index.html that allows you to link files in different folders but then typed it it didn't work work and gave me the webpage not found.