Relative references
Relative references for images on a website.
The HTML code is:
<img src="screenshot.png">
Changing the src changes where the server looks for the image.
Description | Path |
---|---|
The image is in the same folder as the page | "screenshot.png" |
The image is in an images folder in the same folder as the page | "images/screenshot.png" |
The image is in the images folder at the site root | "/images/screenshot.png" |
The image is in the folder one level up from the current folder | "../screenshot.png" |