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 trialMarc Gleason
3,175 PointsI was linking from the about page to the home page instead of using "../" I accidentally just used a "/" and it worked?
Why did it let me go back up to the main html page without using the "../"?
2 Answers
Steven Parker
231,248 PointsA plain slash ("/
") is an absolute reference to the root folder. If your current file is in a folder one level below the root folder, going up one level ("../
") also puts you at the root.
Also, if you are already in the root folder, then the "go up" part of ("../
") is ignored.
What these do would be different if you start from a folder more than one level below the root.
Israel Teixeira
8,836 PointsBoth "\" and "/" worked for me. Is it just a matter of self preference? If you're using VS Code and right click the file > Copy Relative Path, it will give you a path using "\". Thanks