HTML File Paths
Learn how HTML file paths work, including relative and absolute paths, with simple and clear examples.
HTML file paths define how files are linked within a website.
Types of File Paths
Relative Path
<img src="images/photo.jpg" alt="Sample">
Absolute Path
<img src="https://example.com/images/photo.jpg" alt="Sample">
Root Relative Path
<link rel="stylesheet" href="/css/style.css">
Important Notes
- Relative paths are commonly used
- Absolute paths link external resources
- Correct paths prevent broken files
Was this helpful?
Thanks for your feedback!