May
0
Q:

absolute path and relative path

/* Absolute Path */
https://www.w3schools.com/images/picture.jpg

/* Relative Path */
/images/picture.jpg
1
An absolute path refers to the complete details needed to locate a file or folder, starting from the root element and ending with the other subdirectories. Absolute paths are used in websites and operating systems for locating files and folders.
An absolute path is also known as an absolute pathname or full path.

Example:
http://www.foo.com/images/kitten.png
0
A relative file path points to a file relative to the current page.

In this example, the file path points to a file in the images folder located at the root of the current web:
Example:
/images/picture.jpg

In this example, the file path points to a file in the images folder located in the current folder:
Example:
images/picture.jpg

In this example, the file path points to a file in the images folder located in the folder one level above the current folder:
Example:
../images/picture.jpg
0

Tags

New to Communities?

Join the community