HTML links with the a element
The <a> element makes text or an image a link to another resource.
What you will learn
- How to create a link with
href - How to link to another section of a page
Minimal example
<a href="https://example.com">Visit the site</a> <a href="#details">Read details</a>The href value tells the browser where the link should go.
Common mistakes
- Use descriptive link text instead of “click here”.
- Check relative paths carefully when linking local pages.
- Use a button for an action, not for navigation.