HTML · HTML Tutorial · Lesson 27
HTML File Paths
Absolute and relative paths to files.
A file path describes the location of a file in a website folder structure. It is used for links, images, stylesheets and scripts.
| Path | Description |
|---|---|
| <img src="picture.jpg"> | Same folder as the current page |
| <img src="images/picture.jpg"> | In the images folder of the current folder |
| <img src="/images/picture.jpg"> | In the images folder at the root of the site |
| <img src="../picture.jpg"> | One folder up from the current folder |
Absolute File Paths
Example
<img src="https://picsum.photos/id/1011/200/120" alt="Absolute path">
Keep reading “HTML File Paths”
Sign up to read the full lesson (2 more parts), try every example in the live editor, and take the 5-question quiz.