Absolute Paths:
- file path that is the full URL to an internet file
- Ex. <img src=”https://www.w3schools.com/images/picture.jpg” alt=”Mountain”>
Relative Paths:
- a file path to the file relative to the current page
- <img src=”/images/picture.jpg” alt=”Mountain”>
- <img src=”images/picture.jpg” alt=”Mountain”>
- <img src=”../images/picture.jpg” alt=”Mountain’>
“../”
- Each “../” essentially moves the file back one directory. “../../” would move you back two directories. It finds the root folder and the files in it. This is helpful when you aren’t sure where the relative path starts from.
- ../ Example: “http://domain.com/directory/subdirectory_2/page_2.htm” -> “../subdirectory/page.htm”
(It is best to use Relative file paths when possible, web pages won’t be bound to the current base URL. All links work on your own computer, current public domain, and future public domains.)
These paths are important to web design and development because they allow you to have a nice and organized website and structure. Absolute and Relative paths are needed in separate circumstances, but they help you make the best webpage in the end.











