Understanding Links in HTML

← Back to Index

Relative Links

Relative links specify folder, file, and other resources by naming the filesystem path they reside at starting from the current file's location.

Absolute Links

Absolute links are either a complete (absolute) file path including the root directory or a URL with the protocol and domain name:

Quick Reference

Directory Navigation:
• .  = Current directory
• .. = Parent directory

Relative Paths:
• Same directory:    ./
• Child directory:   ./background
• Parent directory:  ../file.ext
• Sibling directory: ../folder/file.ext

Absolute Path:
• https://www.example.com/about.html