Welcome Guest! (App Version 3.1)

websitnero logo name

HTML HyperLinks

Overview

  • Hyperlinks help in navigation to same page or other web-pages.
  • href attribute contains url of the link to navigate to.

How to add hyperlinks in HTML

Anchor tags are used to add hyperlinks to other web pages or even to other web sites. There may be cases where you want your users to click and go to some other page - that page might reside on your own website or it might direct to some other website like facebook, google, twitter, etc.

In anchor tags there is a property 'href'. In this property just add the website address where you want your users to redirect to on clicking the text inside anchor tags. You may even direct the user to some part of the web page he is currently on.

<a href="http://www.google.com"> Google </a>

Look at the example below to understand how anchor tag works:

Example

<body>

  <!-- hyperlink to text -->
  <a href="http://www.google.com">Google</a>

  <!-- hyperlink to image -->
  <a href="http://www.google.com">
    <img src="../img/google.png" />
  </a>
  
</body>
Further Reading

1. Creating hyperlinks

2. <a>

WebsiteNero is highly optimized for learning various website developing technlogies. We try our best to add maximum modules and examples to help learn the concepts clearly and vividly. We try to present all content and examples as simple as we can removing any complexity to hurdle easy understanding. We try best provide you with worthful content, but we cannot guarantee full correctness of all the content on this site. While using this website, you agree to have read and accepted all our terms of use and conditions, cookie, and privacy policy. Copyright, 2013-2018 by websitenero.com. All Rights Reserved.