Challenge - 5 Problems
URL Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate1:30remaining
Understanding Absolute URLs
Which of the following is an example of an absolute URL?
Attempts:
2 left
💡 Hint
Absolute URLs include the full path starting with the protocol (like https://).
✗ Incorrect
An absolute URL contains the full web address including the protocol and domain name. Relative URLs only specify the path relative to the current page.
📝 Syntax
intermediate1:30remaining
Correct Relative URL Usage
Given the current page URL is
https://example.com/blog/post1.html, which relative URL correctly links to https://example.com/images/logo.png?Attempts:
2 left
💡 Hint
Relative URLs starting with a slash
/ start from the root of the website.✗ Incorrect
Using /images/logo.png starts from the root domain, so it correctly points to the image regardless of the current page's folder.
❓ rendering
advanced2:00remaining
Rendering Result of Relative URL
If the current page is
https://example.com/products/item.html and the HTML contains <img src="../images/pic.png" alt="Pic">, what is the full URL the browser will request?Attempts:
2 left
💡 Hint
The
.. means go up one folder from the current page location.✗ Incorrect
The relative URL ../images/pic.png moves up one directory from /products/ to the root, then into /images/.
❓ selector
advanced2:00remaining
CSS URL Selector Behavior
In CSS, if the stylesheet is located at
https://example.com/css/style.css and contains background-image: url('../img/bg.png');, which full URL will the browser load?Attempts:
2 left
💡 Hint
Relative URLs in CSS are relative to the CSS file location, not the HTML page.
✗ Incorrect
The .. moves up one folder from /css/ to the root, then into /img/.
❓ accessibility
expert2:30remaining
Accessibility Impact of URL Choices
Which statement best explains how using relative URLs can affect accessibility and user experience?
Attempts:
2 left
💡 Hint
Think about what happens if a page is moved or copied to a different folder.
✗ Incorrect
Relative URLs depend on the page location. If the page moves, relative links may break, causing assistive technologies like screen readers to fail loading linked resources.