Video tutorialTrack course · freeCodeCamp
Speed
Transcript & captions
10/10
The <a> element creates a hyperlink. The href attribute holds the destination.
- Absolute: https://example.com/page
- Relative: /about or ../images/logo.png
- Anchor on the same page: #section-id
- Email: mailto:you@example.com
- Phone: tel:+15550100
When you use target="_blank", add rel="noopener noreferrer" for security.
Try it yourself
Knowledge check
0/1 answeredWhat does rel="noopener" protect against?