0
i am currently learning html and i am using sololearn, please what is the difference between relative and absolute links??
it says here links can either be absolute or relative
2 Answers
+ 1
SUPPOSE YOUR PROJECT IS IN PROJECT FOLDER.
THIS FOLDER CONTAIN ONE HTML FILE AND ONE CSS FILE.
NOW IF YOU WANT TO LINK YOUR CSS FILE TO YOUR HTML FILE , YOU CAN DO IT IN TWO WAYS :
1. ABSOLUTE PATH
2. RELATIVE PATH
IN ABSOLUTE PATH YOU WRITE PATH IN THIS FORMAT : YOUR FILE IS IN THIS FOLDER THAN IN THIS FOLDER THAN FINALLY FILE NAME.
IN RELATIVE PATH YOU DIRECTLY WRITE PATH THAT IS RELATIVE TO CURRENT FILE I.E YOU DIRECTLY WRITE CSS FILE NAME BECAUSE IT IS ON SAME FOLDER.
0
relative link is just a relative file path, and absolute link is a absolute file path