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.
| Type | Example | Meaning |
|---|---|---|
| Absolute URL | https://site.com/page | Works from anywhere |
| Root-relative | /assets/logo.png | From website root |
| Relative | images/pic.jpg | From current folder |
| Go up | ../css/style.css | One folder up |
⚠️Beginner warning: If your page is inside a folder,
images/pic.jpg and /images/pic.jpg are not the same.📝 Edit Code
👁 Live Preview
💡 Open DevTools → Network: broken paths show 404 errors.