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

General Discussion

HTML website part 2 HELP!!!!!!!

here is my problem and please take under consideration I am a adult ADHD learner. I got to the point where if the files (index.html) and (another_page.html) are in the same folder (links) I can get them to link however, when I move (another_page.html) to (my_directory) or (my_folder) the link is broken and will not return to index.html. I tried the <a href="../index.html">Go Back. I am using EditPad Lite 7 and I have tried in notepad as well. PLEASE HELP!!!! IM me under google hanglouts if that helps im:randaperry05

Ok can u specify the folder structure: initially ur files index.html and another_page.html were in the same folder called links. now u have moved another_page.html to a different folder.. is this folder inside of the links folder or outside?

I had the new folder called (my_directory) inside of the (links) folder with another_page being inside of the (my_directory) folder. I hope this does not sound confusing.

To get to the another_page.html use: <a href="my_directory/another_page.html">link to another page</a>

To get back from another_page to index.html use: <a href="../index.html">Go Back</a>

The ../ looks at the folder above the current folder

2 Answers

Sounds like you've got an issue with file paths

The way it works is that you have to put your files 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

Did you try?

<a href="my_directory/another_page.html">Other Page</a>

Sorry of the markup is a little off I haven't been programming for a couple of months and am a little rusty at the moment.