How To Make Use Of Anchor (A HREF) Tag In Different Ways

Hi! Everyone, hope you all are fine.
Today in this post I will tell you how you can make use of anchor tag in different ways. Most of you must know about anchor tag. If you don’t know, <a> is defined as anchor tag, it is used to link a URL (of a page, document, files, etc.) with word(s) or image(s). While writing (in code) it looks like this

<a href="URL">Content you want to link with</a>

But today I will tell you few more ways to make use of it.

a href

To open URL you have linked in new tab or window: You need to use target=”_blank” in anchor tag

<a target="_blank" href="http://SJbn.Co/">Saket Jajodia</a>

Demo: Saket Jajodia

Open email manager (e.g.: Microsoft Outlook) and compose new email: You need to use mailto: in href=”” attribute and then email address instead of URL

<a href="mailto:admin@SJbn.Co">admin [at] SJbn [dot] Co</a>

Demo: admin [at] SJbn [dot] Co

Open feed: You need to use feed: in href attribute and then feed URL

<a href="feed:">Subscribe to RSS</a>

Demo: Subscribe to RSS

Give title to the text or linked content: You need to use title=”” attribute in anchor tag

<a title="JW Player Is Now Made Easy To Embed With" href="">My last blog post</a>

If you don’t want to link then remove the href=”” attribute
Demo: My last blog post
Hover over it^ and you will see the hidden text

You can replace text (which are before </a> and after “>) with images also. If you have any question or problem let me know.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.