1
I wanted to know how to program hyperlink and IMG src inside a Pen drive to be able to open on other computers just running inside the Pen drive itself.
1
I wanted to know how to program hyperlink and IMG src inside a Pen drive to be able to open on other computers just running inside the Pen drive itself.
1
Solving Problem
You have to use relative path, today you must be using on your link path similar to this:
<script src="c:/usuário/João/desktop"></script>
Where you put all the file path, if you use relative paths:
<a href="desktop/menu2.html">menu2</a>
He would follow the path of the page adding the rest.
Talking a little more about Relative and Absolute Path
The absolute address is the information for the location of the resource independently of the current page (protocol + domain + path). The relative address is information for the location of the resource from the current page.
absolute:
relative:
"inscricao.htm"
Source: http://www.nce.ufrj.br/ginape/cursohtml/conteudo/ligacoes/absrel.htm
Thank you very much Luiz. :)
did it work? did you understand the logic? If yes, mark as solved by checking below the answer rate :), to show other users that this is the @Joãosimões solution
Browser other questions tagged html css
You are not signed in. Login or sign up in order to post.
Hello John! You can put the HTML you have and report what problems you have when using it from a pen?
– Sergio
So Sergio my goal is not a program itself but, I have a problem programming at home and in a presentation on a different computer all my codes are with hyperlink and image paths as default (c:/user/John/desktop) and when I pass by Pen drive nothing else works.
– João Simões
You need to use relative paths. If you put part of the HTML in the question as an example we can help how you should change it.
– Sergio
Click [Edit] to add information and we can then help format.
– Sergio
@I answered, then I saw if it worked.
– Luiz Santos