🔗 Anchor Tag = The Web’s Foundation
Links connect the web. <a> tag creates hyperlinks. Internal pages, external sites, email, phone, downloads.
📝 Basic Links
<!-- External link --> <a href="https://example.com">Example Website</a> <!-- Internal link --> <a href="/about">About Us</a> <!-- Link to section (anchor) --> <a href="#section1">Go to Section 1</a> <!-- Email link --> <a href="mailto:contact@example.com">Email Us</a> <!-- Phone link --> <a href="tel:+1234567890">Call Us</a> <!-- Download file --> <a href="/files/report.pdf" download>Download PDF</a> <!-- Open in new tab --> <a href="https://example.com" target="_blank">Open in new tab</a> <!-- Link with title (tooltip) --> <a href="/about" title="Learn more about us">About</a>
🎯 SEO and Accessibility
<!-- Descriptive link text (SEO) --> <!-- ❌ Bad --> <a href="/products">Click here</a> <!-- ✅ Good --> <a href="/products">View our product catalog</a> <!-- rel attributes --> <a href="https://external-site.com" rel="noopener noreferrer">External Site</a> <a href="/page" rel="nofollow">No Follow Link</a> <!-- Accessible link (screen readers) --> <a href="/docs" aria-label="Read the documentation" title="Documentation" >Docs</a>
💡 Use Cases
- Navigation menus
- Call to action buttons
- Blog post links
- Download links
- Email and phone links
“Anchor tag is the backbone of the web. Mastering href, target, rel makes better UX and SEO. Essential HTML element.”

