-1
I started programming a short time using HTML and my biggest problem is to do a project and when I take to other computers I take a long time changing the image paths and hyperlinks.
How to make links not break when I take my project to another computer?
Example, on my company pc the link is something like:
D: Desktop Programmer users my-project images logo.png
On my pc is
C: Users Joao Desktop my-project images logo.png
If in each computer you take your project the paths are different, you will have to change the same paths. Your question is too vague without an example code to be analyzed.
– Sam
You will learn this over time. Usually you use a programming language that generates the HTML that will be sent to browser, with this it will be possible to create functions in this language, where this function will be responsible for creating a dynamic link (for other pages, images, etc.) just knowing what is the resource you intend to link. Only with HTML is more difficult to do something, probably the best idea is to work with relative addresses instead of absolutes, this already gives a flexibility well but still does not solve all cases.
– Jéf Bueno
I think I understand what you mean. Try to put a relative path in your images, that is, the path occurs from the current page. For example:
<img src="~/Content/images/logotipo.png" alt="Logo" />
in this case, from the site location, it will fetch that path to the image– Alexandre Cavaloti
The strange thing about this question is that the structure of directories and files (paths) of the site (HTML) does not change when you upload everything together to another computer. I don’t know why I have to change that.
– Sam