Quest 1 • Lesson 2
🔗 Links & Navigation
Links are what make the web interconnected. With the anchor tag <a>, you can navigate from one page to another – or even to a specific part of the same page.
"A hyperlink is a reference in a web page that, when clicked, takes you to another location."
links.html
<a href="https://example.com">Visit Example</a>
🧠 Understanding the Anchor Tag
<a>– the anchor element that creates a hyperlink.href– the attribute that specifies the destination URL.- The content between the opening and closing tags becomes the clickable text.
🌐 Absolute vs Relative URLs
Absolute URL – includes the full web address (e.g.,
https://google.com).
<a href="https://google.com">Google</a>
Relative URL – points to a file within your own site (e.g.,
about.html).
<a href="about.html">About Us</a>
✨ Challenge: Create a Simple Menu
Use the anchor tag to build a navigation bar with three links: Home, About, and Contact. Use # as a placeholder href.
<a href="#">Home</a> |
<a href="#">About</a> |
<a href="#">Contact</a>
🔗 Bonus: Open Links in a New Tab
Add target="_blank" to the anchor tag.
<a href="https://example.com" target="_blank">Open in new tab</a>
❤️ Support Free Education
This course is 100% free. If it helps you, consider buying me a coffee.
☕ Buy Me a Coffee➡️ Ready for more?
Next lesson: Images & Multimedia – add visuals to your pages.
Continue to Lesson 1.3 →(Coming soon – check back or buy Pro Pack for instant access)