URLs and paths

Understanding how to link files within your website structure

folder

Same directory

Link to files in the same folder using just the filename

<a href="contacts.html"> Contacts page </a>
subdirectory_arrow_right

Subdirectories

Link to files in subfolders using directory name + forward slash

<a href="projects/index.html"> Projects page </a>
subdirectory_arrow_left

Parent directories

Link to files in parent folders using ../ notation

<a href="../pdfs/project-brief.pdf"> Project brief </a>
Directory structure diagram showing root folder with subdirectories
lightbulb Pro Tip

You can combine multiple path instances for complex navigation: ../../../complex/path/to/file.html