How to link a computer file in my html?

0

How do I link a folder from my computer to my html file? Each folder I want to open is inside the same folder where I saved my html file.

I'll leave the print on the screen to help you understand. Within the pm-projects folder are the pm-project001, pm-project002, and pm-project003 folders; these are the folders I want to open in my html file, which is also saved in the pm-projects folder.

I inserted the href of my html file into the folder path that I want to appear in my list, but clicking on the links I get the answer "Can not GET / Users / Isadora / Documents / Web Development / pm-projects / pm -proj001 ".

<!DOCTYPE html>
<html lang="pt-br">
<head>

 <meta charset="utf-8"> 
 <title>Projetos</title>
 
</head>

<body>
   
    <ul>
        <li class="feito"><a href="C:Users/Isadora/Documents/DesenvolvimentoWeb/pm-projetos/pm-proj001">Projeto 001</a></li>
        <li class="feito"><a href="C:Users/Isadora/Documents/DesenvolvimentoWeb/pm-projetos/pm-proj002">Projeto 002</a></li>
        <li class="feito"><a href="C:Users/Isadora/Documents/DesenvolvimentoWeb/pm-projetos/pm-proj003">Projeto 003</a></li>

    </ul>
    
</body>
</html>
    
    
asked by anonymous 15.01.2018 / 22:03

1 answer

1

In your case, the most appropriate would be to use virtual paths as in the example below. Even if you are accessing your projects via the file system or creating a local hosting for the DesenvolvimentoWeb site, you will retain the same functionality.

And avoid pointing the link only to a directory if there is no server to respond to the request, this will display behavior in each browser, OS and version, depending even on which directory you are saving your files. Without a server it will not open the index or default directory. Either list the files in the browser or it will open the directory in the OS explorer or it will not do anything or even return an error.

<!DOCTYPE html>
<html lang="pt-br">
<head>

 <meta charset="utf-8"> 
 <title>Projetos</title>
 
</head>

<body>
   
    <ul>
        <li class="feito"><a href="../pm-proj001/index.html">Projeto 001</a></li>
        <li class="feito"><a href="../pm-proj002/index.html">Projeto 002</a></li>
        <li class="feito"><a href="../pm-proj003/index.html">Projeto 003</a></li>

    </ul>
    
</body>
</html>
    
    
16.01.2018 / 12:33