Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

<a href=""> root of folder rather than index.html

Tags:

html

I have tried googling but all of the links I find are about linking resources, for example images with ../, Might be an easy question to solve - but internet searches aren't helpful...

Say I have the folder "html" of which my webserver would use as the root, within that folder is index.html, page.html and page2.html, when linking something I'd usually do: <a href="index.html">Home</a> but is there a way to link the root, so you get demos/ rather than demos/index.html.

like image 966
user3352340 Avatar asked Oct 16 '25 23:10

user3352340


2 Answers

./ is the notation for the root of the current folder

like image 139
Alex Avatar answered Oct 19 '25 14:10

Alex


Use

<a href="../abc.html">Back to Fruits List</a>

.. Goes to root ,and you can fetch any page after that.

like image 41
Pratik Avatar answered Oct 19 '25 14:10

Pratik



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!