Simon Suh Simon Suh - 2 months ago 10
HTML Question

What does "./" (dot slash) refer to in terms of an HTML file path location?

I know

../
means go up a path, but what does
./
mean exactly?

I was recently going through a tutorial and it seems to be referring to just a file in the same location, so is it necessary at all? Can I just not use it if that's all it's doing?

Answer

./ is the the folder that the working file is in:

So in /index.htm ./ is the root directory
but in /css/style.css ./ is the css folder.

This is important to remember because if you move CSS from /index.htm to /css/style.css the path will change.

Comments