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 trialRyan Harder
1,384 PointsWhy only img/logo.gif instead of the full filename?
Why doesn't Nick have to type in the full filename of the logo? I tried it out on mine and it also worked, but I don't understand why. Is it because it's in the same folder as the index.html?
1 Answer
Richmond Lauman
28,793 PointsThe file path works in this case because the img folder (which contains the logo.gif file) is located in the same folder as the index file (the root folder). As long as the path is relative to the root of the site where the index file resides, it will work.
When you refer to the "full file name" are you referring to a path like "C:\Users\Richmond\Documents\Web Page Project\img/logo.gif"?
If that is what you meant, you should not use that kind of file path for a website.
Ryan Harder
1,384 PointsRyan Harder
1,384 PointsI see. I didn't realize that the location of the index made a difference. Thanks for clarifying.