Let's assume that I have a website with three files:
/home/blog.html
/home/picture1.jpg
/home/files/picture2.jpg
Now let's edit that blog.html file. When I want to make a link to the current folder, I'll do it this way:
<a href="./">Current folder</a>
But what's the right way to make a link to a file in the current folder, to a subfolder or to a file in a subfolder? It can be either:
<a href="picture1.jpg">Picture 1</a>
<a href="files/">Files</a>
<a href="files/picture2.jpg">Picture 2</a>
or
<a href="./picture1.jpg">Picture 1</a>
<a href="./files/">Files</a>
<a href="./files/picture2.jpg">Picture 2</a>
As I checked, both ways work fine in my browser. But I would like to know which of them is the preferred way? Is any of them in some detail slightly better?