SA-21/06, C-11, Asapur, Varanasi, UP support@kamaldnp.com +91 8318013442
Lesson 13 of 30

HTML Links

2 min read · Free · No login needed

Links are what make the web a web. The <a> tag (short for anchor) creates a link, and the href attribute says where it goes. The text between the tags is what the visitor clicks.

Types of links

  • External link — to another website: <a href="https://kamaldnp.com">KAMALDNP</a>. Always use the full address starting with https://.
  • Internal link — to another page on your own site: <a href="about.html">About Us</a>. Use a relative path, no domain needed.
  • Link to a section — to an element with an id on the same page: <a href="#contact">Jump to Contact</a>.
  • Email link — opens the visitor's email app: <a href="mailto:support@kamaldnp.com">Email Us</a>.
  • Phone link — starts a call on mobile: <a href="tel:+918318013442">Call Us</a>.

Opening a link in a new tab

Add target="_blank" and, for safety, rel="noopener": <a href="https://example.com" target="_blank" rel="noopener">Open in new tab</a>. Use this for external links, so your visitor does not leave your site. For links inside your own site, let them open in the same tab.

Link text matters

Write link text that describes the destination: "Download the BTEUP syllabus" is good; "click here" is bad. Google reads link text to understand what the linked page is about, and screen-reader users often jump from link to link without reading the surrounding words.

Tip: You can put an image inside a link to make the image clickable — just place the <img> tag between the <a> tags.

Example

Example
<!DOCTYPE html>
<html>
<head>
<title>Links</title>
</head>
<body>

<a href="https://kamaldnp.com">KAMALDNP Academy</a><br>
<a href="about.html">About Us</a><br>
<a href="#contact">Jump to Contact</a><br>
<a href="mailto:support@kamaldnp.com">Email Us</a>
<h2 id="contact">Contact</h2>
<p>Reach us any time.</p>

</body>
</html>

Output

Output — how it looks in the browser
Output of HTML Links
Try it yourself: copy the code above into a file named test.html, open it in your browser, and change the text to see what happens. That is how you learn — by changing things and watching the result.
Get certified — just ₹10

Finish all 30 lessons, pass the test (80%), pay ₹10 and get your certificate.

Take the test
Go further with a full course

Free tutorials teach you the basics. Our paid courses add live projects, mentorship and a certificate.

Full Stack PHP Development Course 2026
₹3,000
View
Core Python Programming – 3 Month Complete Course
₹700
View
AI & ML with Azure AI, AWS AI & Generative AI
₹10,000
View
Browse all courses
HTML — Lessons
1. HTML Introduction 2. HTML Editors 3. HTML Basic 4. HTML Elements 5. HTML Attributes 6. HTML Headings 7. HTML Paragraphs 8. HTML Styles 9. HTML Formatting 10. HTML Comments 11. HTML Colors 12. HTML CSS 13. HTML Links 14. HTML Images 15. HTML Favicon 16. HTML Page Title 17. HTML Tables 18. HTML Lists 19. HTML Block and Inline Elements 20. HTML Div 21. HTML Classes 22. HTML Id 23. HTML Iframes 24. HTML JavaScript 25. HTML File Paths 26. HTML Head 27. HTML Layout 28. HTML Responsive 29. HTML Semantics 30. HTML Forms
Final Test — Certificate ₹10

🤖 KAMALDNP AI Assistant

Ask about courses, website & more

Hi! I'm KAMALDNP AI Assistant. Ask me about our courses, website features, or anything else! 😊
Please wait 5s...
🛡️ 7-Day Money-Back Guarantee
🤖 KAMALDNP Assistant ✕

Request human callback:

🔐 Login Required
✕

Download karne ke liye login karo. Login ke baad yahi page pe rahoge!

Naya ho? Register karo →