HTML Links
Learn how to create and use HTML links with the anchor tag, including attributes, internal links, and email links.
HTML links are used to connect one page to another or to external resources.
Links are created using the <a> (anchor) element.
Basic Link Syntax
<a href="https://example.com">Visit Example</a>
href→ destination URL- Link text is clickable content
Link with Common Attributes
<a
href="https://example.com"
target="_blank"
rel="noopener noreferrer"
title="Go to example website">
Open Example
</a>
Attributes Used
href→ link addresstarget→ where link opensrel→ security and relationshiptitle→ tooltip text
Internal Page Links
<a href="about.html">About Us</a>
Used to link pages within the same website.
Email and Phone Links
<a href="mailto:info@example.com">Email Us</a>
<a href="tel:+911234567890">Call Us</a>
Important Notes
- Always use meaningful link text
- Use
relwhen opening links in new tabs - Avoid using “click here”
Was this helpful?
Thanks for your feedback!