The <a> element is used to create links on a webpage. Links allow users to click and go to another webpage, another website, or even another section of the same page. Think of links as the connections of the web — they make the internet useful by helping users navigate easily between pages.

You can use the <a> tag to link to:
- Websites
- Other pages on your site
- Email addresses
- Downloads
- Sections on the same page
To create a link, you use the href attribute to tell the browser where the link should go.
Understaning the layout of the <a> Element
| Start tag | Element content | End tag |
|---|---|---|
| <a href=”https://www.educodes.org”> | View Educodes | </a> |
📘 Example Code
Below is an HTML example showing a heading and a link:
💡 This is what the code looks like inside an editor
🖥️ What This Will Look Like in a Browser
✅ Example output you would see on a webpage:
🧪 Time to Practise!
Now it’s your turn to create your own clickable link to Google.
Try this example first:
<a href="https://www.google.com">Visit Google</a>
What To Do
✅ Type the code above in the editor below
✅ Click Test Code to see the result
✅ Try changing the link text
✅ Try linking to a different website (example: https://www.youtube.com)
Tip 💡
Links are one of the most important parts of the web.
Use descriptive text so users know where the link goes — avoid generic text like “click here.”
Strong link text helps with usability and SEO. 🚀

