Paths & URLs

All HTML topics
∙ Chapter 37

Paths & URLs

A path tells the browser where to find a file (image, page, CSS, JS). Beginners often break links because of wrong relative paths.

TypeExampleMeaning
Absolute URLhttps://site.com/pageWorks from anywhere
Root-relative/assets/logo.pngFrom website root
Relativeimages/pic.jpgFrom current folder
Go up../css/style.cssOne folder up
⚠️Beginner warning: If your page is inside a folder, images/pic.jpg and /images/pic.jpg are not the same.
paths.php
📝 Edit Code
👁 Live Preview
💡 Open DevTools → Network: broken paths show 404 errors.