Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How do you reference back to a parent folder in html?

I’m having trouble referencing back to parent folders using html. Here is a picture of my folder:

folder pic

The below code is index.html:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

<html>
        <title>HTML Experiments</title>
        <h1>This is a website that I made</h1>
        <ul>
            
            <li>Here is another file: <a href="InsideTheRootFile1.html">another file</a></li>
            <li>Here is an extra file: <a href="extras 1/insideextras.html">extras</a></li>
            
        </ul>
</html>

Here is insideextras.html:

<html>
        <h1>it worked!</h1>
        <p>here you can go back to index: <a href=".../index.html">index</a></p>
</html>

Index.html works OK and I can access insideextras.html from there, but when I try to go back to index.html it doesn’t work. Any suggestions?

>Solution :

You got an extra dot.

Just fix

<p>here you can go back to index: <a href=".../index.html">index</a></p>

to

<p>here you can go back to index: <a href="../index.html">index</a></p>

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading