Links (or anchor tags) in HTML allow users to click and navigate to:
Create a link to https://www.wikipedia.org that says “Go to Wikipedia”.
Create a link to https://openai.com that opens in a new tab.
The target="_blank" attribute opens the link in a new browser tab.
Create a link that lets users send an email to hello@example.com.
Use mailto: to open the default email app with the address pre-filled.
Create a link to download a file named example.pdf.
The download attribute downloads the file instead of opening it.
Create a link that jumps to a specific section of the same page.
Use href="#id" to jump to an element with that ID.
You jumped here using an anchor link!
You can style links using CSS like this:
a {
color: blue;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}