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 |
---|---|---|