HTML Links / Anchors

Links are the secret sauce of the web — without them, you’d be stuck on one page forever. In HTML, you create them with the <a> tag, short for “anchor,” and trust me, it’s one of the coolest tools you’ll pick up early on. It’s how you jump from your site to Google, a blog post, or even a spot on the same page. Let’s break it down.

The basic setup is simple:

<a href="https://www.meripariksha.com">Click me!</a>

That href part (short for “hypertext reference”) is where you put the destination—like a web address. The text between <a> and </a>—“Click me!”—is what people see and click. Open it in a browser, and bam, it’s a live link.

I’ve played with these a ton, and they’re super versatile. You can link to:

  1. Another website: <a href="https://google.com">Google it</a>.
  2. A page on your site: <a href="about.html">About Me</a> (if “about.html” is in your folder).
  3. An email: <a href="mailto:me@example.com">Email me</a> — clicking opens their email app.

Here’s a fun one I tried once:

<p>Visit <a href="https://www.meripariksha.com.com/tutorials/d/html">this site</a> to Learn HTML!</p>

It blends right into a sentence—smooth, right?

You can also make anchors jump within a page. Say you’ve got a long page with a “Top” section:

<a href="#top">Back to top</a>
<!-- Way up there -->
<h1 id="top">Top of the Page</h1>

That #top links to anything with id="top". Click it, and you zip right up. I messed this up once by forgetting the # — total rookie move—but it clicked eventually.


One tip: keep your link text clear. “Click here” works, but “Read my bio” tells folks what they’re getting. Next time you’re coding, throw in an <a> tag and link something—maybe your favorite site. It’s like handing out a map to the web!

How-To Guides for HTML

No How-To Guide is available right now.

Keep Learning & Level Up!

Enhance your HTML skills with our in-depth tutorials and interactive quizzes.

Explore HTML Quiz