Logo
HTMLCSSJavaScriptReactjsnewContactUpdates

Get started today

HTMLCSSJavaScriptReactjsnewContactUpdates

Tools

Resume BuilderQR GeneratorVS Code Editor

Connect

GitHubWhatsApp Channel
image tag
list

HTML Hyperlink

By Saket Bhatnagar•June 14, 2025•Beginner to Intermediate

Table of Contents

  1. hyperlink
  2. Anchor Tag
  3. Attributes of Anchor Tag
  4. Example

hyperlink

  1. 1Hyperlinks are used to link our webpage with some other documents or other part of document.
  2. 2Hyperlinks are created using the <a> (anchor) tag and are usually displayed as underlined text in blue color.
  3. 3To provide path or hyper reference we have to use href attribute of <a> tag.

Anchor Tag

  1. 1Anchor tag is used to create a hyperlink on a web page.
  2. 2It is container tag.
  3. 3It is inline level element.
  4. 4The content that we want to create as a hyperlink should be written within <a>..</a> tag.
  5. 5Syntax:- <a> ..text.. </a>(Here, we have marked the text to create hyperlink.)

Attributes of Anchor Tag

  1. 1 href attribute - It is used to provide path or hyper reference to the marked content. When user clicks on hyperlink that hyperlink takes the user to the specified path given in href attribute. (<a href="path"></a>)
  2. 2 target attribute - It is used to specify where to open the hyperlink. <a target="_blank"></a> means that our hyperlink will open in a new tab.

Example

  1. 1<a href = 'https://www.google.com' target="_blank"> Google</a> is a search engine.
    Here, we have marked Google text to create hyperlink and when we click on the text,it will take us to the path specified in the href attribute i.e., google website.

Share this article

Last updated: July 14, 2025

Join Our Community

Login to Join

© 2025 Saket Bhatnagar. All rights reserved.

    ☕