Topic 28 of 57 5. HTML Layout and Structure Interactive Tutorial
HTML File Paths: Absolute and Relative Paths with Examples
On This Page0 sectionsQuick jump to subtopic
Topic Overview & Definition
Key Question
What is the difference between absolute, root-relative, and relative file paths in HTML?
Direct Answer & Overview
HTML file paths describe the location of a file in a website's folder structure. Absolute paths specify the complete URL including protocol and domain (https://example.com/logo.png). Relative paths point to files in relation to the current document's directory (./images/logo.png or ../logo.png). Root-relative paths (/images/logo.png) begin from the web server root.
Comprehensive Step-by-Step Concepts
1) Understanding File Paths: Whenever you reference an external resource in HTML (stylesheets in , scripts in