Recall & Review
beginner
What is an absolute URL?
An absolute URL is a full web address that includes the protocol (like https://), domain name, and the full path to a resource. It points to the exact location on the internet.
Click to reveal answer
beginner
What is a relative URL?
A relative URL points to a resource based on the current page's location. It does not include the domain name or protocol, just the path relative to the current page.
Click to reveal answer
beginner
Example of an absolute URL?
https://example.com/images/photo.jpg is an absolute URL because it includes the protocol (https://) and the full domain name.
Click to reveal answer
beginner
Example of a relative URL?
images/photo.jpg is a relative URL because it points to a file inside the 'images' folder relative to the current page.
Click to reveal answer
intermediate
Why use relative URLs instead of absolute URLs?
Relative URLs make it easier to move or copy a website to a different domain without changing all links. They also keep links shorter and simpler.
Click to reveal answer
Which URL is absolute?
✗ Incorrect
Only option C includes the full protocol and domain, making it an absolute URL.
What does a relative URL depend on?
✗ Incorrect
Relative URLs depend on where the current page is located to find the resource.
Which is a benefit of using relative URLs?
✗ Incorrect
Relative URLs make it easier to move a site without changing all links.
Which URL is relative?
✗ Incorrect
Option A starts with a slash but no domain, so it is relative to the root of the current domain.
What does an absolute URL always include?
✗ Incorrect
Absolute URLs always include the protocol (like https://) and the domain name.
Explain the difference between absolute and relative URLs in your own words.
Think about whether the URL includes the full web address or just a path.
You got /3 concepts.
Why might a web developer choose to use relative URLs instead of absolute URLs?
Consider what happens if the website address changes.
You got /3 concepts.