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 How to Make a Website Adding Pages to a Website Add Iconography

Can someone explain the .. in html to me?

what is the .. mean?

3 Answers

Michael Hulet
Michael Hulet
47,912 Points

It tells the browser to look one directory up from where it is currently in the server's file structure. Let's say you have a page in About>People>Vince on a server, and you need to get a picture to display from img>Employees, where both About and img are in the same folder on the server. Your computer would request the page at About/People/Vince, and that page tells your computer that it can find the image at ../../../img/Employees/Vince.png. Your browser would go up one directory from where it is, and it would be in the People folder. It would then go up one more to About, then finally one more to the root of the server. It would then go down into img/Employees, and find the file Vince.png. It would load that file, then jump straight back to About/People/Vince. Does that make sense?

the ".." is part of a path to a file or folder. It means that the file is located one level higher in the folder hierarchy.

here's an example. let's say you have a page of your website here: /home/vince/website/blog/index.html

and you have an image which you want to add to that page stored here: /home/vince/website/profile_pic.jpg

note that the image is NOT in the "blog" folder, it is in the parent "website" folder. so if you want to add this image to the blog page, the RELATIVE path to that image seen from the blog page would be: ../profile_pic.jpg

EDIT: Michael was faster :o)

Lucille daCosta
Lucille daCosta
2,286 Points

Help!--I still don't get this at all. I thought we put all images in the image folder and point to that? When we added the profile picture or the twitter/facebook logos isn't that what we did? Why are these contact icons any different. Thanks for your help....