The whole internet is basically a giant pile of links. Click one thing, go to another thing. It's like teleportation for bored people.
Links = Digital Doorways
A link (or "hyperlink" if you're fancy) is a clickable thing that takes you somewhere
else. Text, buttons, images—if it's clickable and moves you, it's a link. The magic
sauce? The <a> tag.
<!-- The basic "I want out" link -->
<a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ">
Click for free cookies! (Probably not)
</a>
<!-- Link to another page in your site -->
<a href="about.html">Learn about our tragic backstory</a>
<!-- Link that opens in a new tab (so you don't lose your place) -->
<a href="https://www.wikipedia.org" target="_blank">
Wikipedia - for when you need to win an argument
</a>
href = "Hypertext REFerence" (AKA "Where To")
This is the address. It can be a full URL (https://...), a page in your site (about.html), or even an email (mailto:someone@example.com).
target="_blank" = "Open in New Tab, Please"
This makes the link open in a new tab. Use it when sending people away from your site so they can easily come back. It's good manners!
The Clickable Stuff
Whatever you put between <a> and </a>
becomes clickable. Text, images, even a weird dancing GIF.
Watch Out For "Dead Links"
If your href points to nowhere (like "page_that_doesnt_exist.html"), you get the dreaded 404 error. It's like promising pizza and delivering broccoli.
Pro Tip: Link Text Should Make Sense
Don't use "click here" for everything. Use descriptive text like "Download the recipe" or "Read about cats wearing hats". Better for accessibility and Google!