1. The basic form of a link in any html document takes the following form:

<a href="1.html">xxx</a>

<a href="bioov.html">Charles Dickens — Biographical Information</a>

This link in the folder for Charles Dickens (authors/dickens) will open the document entitled “Charles Dickens — Biographical Information” (authors/dickens/bioov.html) which consists of a list of links to relevant essays. This link will work only if the document containing it and bioov.html are at the same level — that is, in the same folder or directory.

2. If, however, you want to link to something in a subfolder inside the main Dickens folder (or directory), such as “family,” then you must include the name of the folder. For example if you wished to link from <a href="bioov.html"> (Charles Dickens — Biographical Information) to catherinedickens.html (Catherine Dickens (née Hogarth), 1816-79), you would create the following link:

<a href="family/catherinedickens.html">Catherine Dickens (née Hogarth)</a>

3. What do you do if you want to make a link from the biography of Catherine back to bioov.html, the list or homepage for material about Dickens's life? Since you are now one level down in the file structure, you need to use the following to go up one level: ../. The link in catherinedickens.html therefore would be

<a href="../bioov.html">Charles Dickens — Biographical Information</a>

4. If, however, you wished to make a link from “Catherine Dickens” to a document in a folder for another author, say, Wilkie Collins, you would not only have to leave the “family” folder but also the one named “Dickens.” That would require going up two levels by using ../../, so a link to Collins’s homepage would be

<a href="../../collins/index.html">Wilkie Collins</a>

5. Moreover, if you wished to go outside the authors folder and link to a document on divorce in Gender Matters, a folder on the same level as Authors, then you would have to get out of Authors with another ../ :

<a href="../../../gender/divorce.html">Divorce in the Victorian Period</a>

What to Remember


Last modified 13 July 2021