✔ In HTML, a file path specifies the location of a file (such as an image, stylesheet, script, or webpage) that you want to link to or display.
✔ File paths are used in attributes like src
(for images, scripts) and href
(for links, stylesheets).
1️⃣ Absolute File Path → Specifies the full URL of a file.
2️⃣ Relative File Path → Specifies the file’s location relative to the current document.
✔ An absolute path includes the full URL or complete directory location of the file.
✔ It is useful when linking to external websites or resources stored at a fixed location.
<img src="https://www.example.com/images/photo.jpg" alt="Image">
✔ The image is loaded from https://www.example.com/images/photo.jpg
.