0
What is the difference between relative and absolute path ?
1 Answer
+ 2
Imagine you have 2 files in your folder.
One file is your index.html , and the other one is style.css .
If you want to link css file to html, you would write:
<link rel='stylesheet' href='style.css'>
If you want to put an image in your index.html â where the image is from the internet you would write:
<a href='https://youtube.com/watch?/path-to-a-video'>Watch my latest YouTube video</a>
In other words, relative URL (uniform resource locator) path is a path that link to files within your directory (other files that you have in your folder, which you link to each other) â First example
Absolute path is the one, which links to external webpages, i.e. something which can not be linked through relative path, e.g. you can not link someone's webpage just be typing webpage's relative path. Since it wouldn't work on your index.html as you do not have the HTML file you're trying to link, therefore it's absolute â Second example