Topic 28 of 57 5. HTML Layout and Structure Interactive Tutorial

HTML File Paths: Absolute and Relative Paths with Examples

11 mins read Last updated: 12 Nov 2026 15,300 views

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