HTML HTML Basics Images, Text and Links Understanding File Paths

Steven Barrett
Steven Barrett
658 Points

Why Use ../ over / in html file paths

If / goes to the root and gives you access to all folders anyway why use ../?

Surely / is safer should files move?

4 Answers

Sem Peters
Sem Peters
3,669 Points

You're right. Just remember that / does not work if you don't have your website hosted on a server, or using xampp or something similar.

Dmitry Polyakov
Dmitry Polyakov
4,415 Points

../ takes you one level up... ./ - the same directory

Alp Mumcu
Alp Mumcu
Front End Web Development Techdegree Student 835 Points

I just used "/index.html" instead of ../..index.html and it worked too

Acatrinei Leonard Cezar
Acatrinei Leonard Cezar
1,766 Points

Im using "../../index.html" and it still not working ?!