Very often you will not know the absolute path to a Web page (even one you have created.) So of course you can't use an absolute path name.
Also, even when you are creating a Web site on your home computer it is convenient to be able to rearrange things. This is much easier with relative path names.
The picture shows the Web site we wish to create.
Below are (in simulation) the three disk files that are
to be linked.
Both Pets
and Hobbies
are
subdirectories of the directory that myHome.html
is in.
myHome.html | Hobbies/myHobbies.html | Pets/myPets.html |
---|---|---|
Edit the simulated Web pages so that their links match the picture. (Since these are not actually disk files you won't be able to see what they do unless you copy each one to Notepad and use Notepad to save each to a file.)