Type of Computer file path
We have two types of Computer file Paths:
Relative Path
Absolute Path
Relative Path:
Imagine you're telling your friend where to find your favorite toy in your room. You might say, "It's in the drawer next to the bed."
In HTML, a relative path tells the computer where to find a file based on where the HTML file is located.
Here's an example:
It's like saying, "Look for the toy picture in the 'images' folder right next to this webpage."
Absolute Path:
Now, imagine you're telling your friend where to find your favorite toy in your house from anywhere in the world. You might say, "It's in my room, at 123 Main Street."
In HTML, an absolute path tells the computer the full location of a file from the root of the computer or the internet.
Here's an example:
- It's like saying, "Look for the toy picture at the exact address 'https://www.example.com/images/toy.jpg' on the internet."
Subscribe to my newsletter
Read articles from Arjun Sharma directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Arjun Sharma
Arjun Sharma
"Enthusiastic QA Analyst with a profound interest in backend development, driven by a passion for creating robust and reliable software systems. Committed to continuous learning and exploration of backend technologies, I find joy in unraveling complexities and optimizing performance. Beyond the code, I am dedicated to mentoring kids, sharing my knowledge, and igniting their curiosity for technology. Through insightful blog posts, I aim to inspire others while fostering a supportive community of learners. Join me on this journey as we explore the world of backend development and empower the next generation of tech enthusiasts!"