Solution 1 :

So IF ‘X’ is your main folder any files in that folder will be accessed like this

<a href="./index.html">Index</a>
<a href="./contact.html">Contact</a>
<a href="./MainContent.html">Main Content</a>

For A, B, and C which are your sub-folders inside X, files can be accessed like this

For Folder A: <a href="./A/index.html">Index</a>

For Folder B: <a href="./B/index.html">Index</a>

For Folder C: <a href="./C/index.html">Index</a>

Solution 2 :

Linking to Relative Page


|—— about.html
|—— contact.html
|—— index.html

<a href="./contact.html">Contact</a>

Solution 3 :

The cleanest way to link between these pages is to use URLs relative to your document root. See Absolute vs relative URLs for more information, but starting each URL with / (making your URLs relative to the document root) will help a lot.

Example: let’s treat your Project Money directory as your document root, and let’s say these are being accessed at This means to access your homepage, you just go to or and it loads your homepage. Additionally, will load your contact page, and will be your YouTube page. Now to deal with subdirectories. will load the article1.html page within the A directory.

So to link to your article1.html page from anywhere else, use /A/article1.html as the href value, and similarly to link to your homepage from anywhere else, you can use /index.html. Using the URLs relative to the document root makes linking between pages a lot cleaner than relative to the current path (./A/article1.html, ./article1.html, article1.html, ../index.html, etc). See for additional examples, which also links to additional resources.

Problem :

I have different pages for my website and I have put those HTML files in a folder X and inside there are index.html, main.html, etc and there are more different pages for different articles. Now that I have separated those articles in different folders A, B, C for easy access inside folder X but now my index.html, main.html etc files are not linking to the article pages. And not even article files are linking to each other.

Look at image for a better understanding of my problem.

        <a class="active" href="Index.html" target="_blank">Home</a>
        <a href="#" target="_blank">Anime Stuff</a>
        <a href="Youtube.html" target="_blank">YouTube</a>
        <a href="Contact Me.html" target="_blank">Know Me</a>

Look At The Image To Understand More Clearly About My Problem!


Comment posted by Nelie

Still, It Is Showing File Was Not Found. When Clicking On The Link. What Should I Do Now?

Comment posted by Nelie

Man, I Am Still Running In The Same Problem. What Should I Do Now?

Comment posted by WOUNDEDStevenJones

can you expand what you mean by “the same problem”? You should be able to use

Comment posted by Nelie

I Did Exactly What You Told Me, But I Don’t Know For Some Reason When I Click On Link In The Page It Shows

Comment posted by WOUNDEDStevenJones

What is the URL of the page you’re starting on, what is the value of the

Comment posted by Nelie

Starting Page URL: (file:///D:/Madeline’s%20Stuff/Sublime%20Text%203/Project%20Money/High%20School%20DxD/HSDxD.html), The Value Of The