LESSON 8
Links
Learning objective: Connect pages and sites using anchor elements.
Understand
Links are what make the web a web — they connect pages together.
The anchor element <a> creates a link. Its href attribute holds the destination: another page, a full website URL, or a spot on the same page. Add target='_blank' to open the link in a new tab.
Analogy: A link is like a doorway: href is the address of the room it opens into.
See It in Action
An external and an internal link:
<a href="https://bynteq.com">Bynteq</a>
<a href="about.html">About page</a>How it works: The first
href is a full web address; the second points to another file in the same folder. Both turn the text into a clickable link.Try It Yourself
- Create a link to your favourite website.
- Create a second link to another page in your project.
- Add
target='_blank'to one of them.
Quick Quiz
Which attribute sets a link's destination?
Challenge
Build a small menu of three links to real pages or sites.
Success condition: All three links are clickable and go to the correct destinations.
+10 XP
Lesson Complete
You answered correctly and completed the required practice. Your progress has been saved on this device.
Continue to next lesson →