HTML Link (Hyperlinks)

HTML links are hyperlinks.

You can click on a link and jump to another document.

When you move the mouse over a link, the mouse arrow will turn into a little hand.

Note: A link does not have to be text. A link can be an image or any other HTML element!

HTML Syntax


<a href=”url”>link text here</a>

The most important attribute of the <a> element is the href attribute, which indicates the link’s destination.

The link text is the part that will be visible to the reader.

Clicking on the link text will send the reader to the specified URL address.


This example shows how to create a link to

<a href=””>Visit Guiding Square!</a>

By default, links will appear as follows in all browsers:

  • An unvisited link is underlined and blue
  • A visited link is underlined and purple
  • An active link is underlined and red


HTML Links - Use an Image as a Link

To use an image as a link, just put the <img> tag inside the <a> tag:


<a href=””>
<img src=”example.jpg” alt=”HTML tutorial” width=”20px” height=”20px”>

Button as a Link

To use an HTML button as a link, you have to add some JavaScript code.
JavaScript allows you to specify what happens at certain events, such as a click of a button:


<button onclick=”document.location=’'”> HTML Tutorial </button>

Link to an Email Address

Use mailto: inside the href attribute to create a link that opens the user’s email program (to let them send a new email):


<a href=””> Send email </a>

Thank you for reading and understanding our Blog. If have any another doubt, there is a place which is called Comment section. Go there and comment your doubt. We will try to solve/fix your doubt.
If you liked our blog, please consider subscribing to our Youtube channel.
Our Youtube channel is – Guiding Square
Our other Social Media links are below if you want to follow us.

21 Replies to “HTML Link (Hyperlinks)”

  1. Having read this I thought it was rather informative. I appreciate you spending some time and energy to put this informative article together.
    I once again find myself spending way too much time both
    reading and commenting. But so what, it was still worthwhile!

  2. Thanks so much with regard to giving us an update on this topic on your
    blog. Please know that if a brand-new post becomes available or in the
    event any variations occur about the current publication, I would be considering reading
    a lot more and understanding how to make good usage of
    those methods you discuss. Thanks for your time and consideration of other folks by
    making your blog available.

    Also visit my blog :: Blast Classic Desktop AC

  3. hi!,I like your writing very much! share we keep in touch more approximately
    your article on AOL? I require a specialist in this house to solve my problem.
    Maybe that is you! Having a look forward to look you.

    my web page:

  4. It’s the best time to make a few plans for the long run and it is time to be happy.
    I have read this post and if I may I wish to suggest you few fascinating things or advice.
    Maybe you can write next articles referring to this article.
    I wish to learn even more things approximately it!

  5. wonderful put up, very informative. I wonder why the other experts of this sector don’t understand this.
    You must proceed your writing. I’m sure, you’ve a huge readers’ base already!

  6. Hey There. I found your blog using msn. This is a really well written article.
    I’ll be sure to bookmark it and come back to read more of
    your useful information. Thanks for the post. I’ll certainly return.

  7. Hi there! I just wanted to ask if you ever have any issues with hackers?

    My last blog (wordpress) was hacked and I ended up losing several weeks of hard
    work due to no data backup. Do you have any methods to prevent hackers?

Leave a Reply

Your email address will not be published. Required fields are marked *