Home » Web programming/HTML

HTML 'a' Tag with Examples

HTML | <a> Tag: In this tutorial, we are going to learn about the Anchor (<a>) tag in HTML with its description, syntax, and examples.
Submitted by Shivang Yadav, on February 21, 2020

<a> Tag

<a> tag in HTML is used to add a hyperlink to another webpage in HTML. It uses the href attribute to link to destination files in HTML.

There are basically three types of links in a webpage,

  1. unvisited link: indicated by the blue underlined link.
  2. visited link: indicated by the purple underlined link
  3. active link: indicated by a red-underlined link

Syntax:

<a href="linkToOtherWebpage">ContentOfTheTag</a>

Technical insights of <a> tag

  • It supports global attributes and attributes that handle events of HTML5.
  • Supported by all browsers.

Example:

<!DOCTYPE html>

<html>

<head>
    <title>HTML Tutorial at IncludeHelp</title>
</head>

<body>
    <h1>HTML tutorial</h1>
    <p>You can find tutorial on HTML: <a href="https://www.includehelp.com/html/">HTML Tutorial</a></p>
</body>

</html>

Output

HTML | a Tag




Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.