ankitweblogic logo
W e b t u t o r i a l s

HTML Tutorial

Define Website

Define HTML

HTML, Head, Title tag

HTML Body tag

HTML Heading tags

HTML Paragraph tag

HTML Horizontal Line

HTML Hyperlink

HTML Image tag

HTML Font tag

HTML Exercise

HTML Text Direction

HTML Comment

HTML Lists

HTML Marquee tag

HTML Table tag

HTML Table Website

HTML Frame

HTML Iframe

HTML Fieldset tag

HTML Form Elements

HTML Form Exercise

HTML Image Map

HTML Div & Span Tag

CSS Float & Clear

HTML Color Codes

HTML Symbols

HTML Assignment

HTML Hyperlink

A webpage can contain various links that take you directly to other page, these links are known as hyperlinks. Hyperlinks allow visitors to navigate between webpages or websites by clicking on a word or a image.
A Hyperlink is specified using HTML tag <a>, this tag is known as anchor tag and anything between the opening <a> tag and closing </a> tag becomes part of hyperlink. When a user clicks on that part linked document will be opened.

Attributes of Anchor tag are:

hrefStands for Hyperlink Reference, use to specify the file name to be linked.
target Specifies where to open the linked document. Its values are:
_blank: Specifies to load the linked file into a new blank window/tab.
_self: Load the file into the same tab window in which the linked text was clicked in.
Default target value is _self
title The title attribute is used to provide a tooltip on the hyperlinked.
Style Specifies an in-line style for the tag. Style attribute can be use to decorate the hyperlinked text underline its value can be as follows:
text-decoration: none;
text-decoration: overline;
text-decoration: line-through;
text-decoration: underline;
  <a href="home.html"> Hyperlink Text Here </a>
  <a href="home.html" target="_blank"> Hyperlink Text Here </a>
  <a href="home.html" title="Click Me"> Hyperlink Text Here </a>
  <a href="home.html" style="text-decoration: none;"> Hyperlink Text Here </a>

When you move the mouse over a link, the mouse arrow will turn into a little hand. By Default, An unvisited link is blue color e, when you click on it, link will be visited, A visited link is purple color, and when you press and hold the mouse left button link become active until you release the button, Default Active link is red color with a underline.

Create a Bookmark

HTML Bookmarks are used to links to the same page on a specific part. Bookmarks can be useful if your webpage is very long. When the link is clicked, the page will scroll to the location with the bookmark. For example: <h2 id="bookmark">Bookmark

Then, add a link to the bookmark

<a href="#bookmark">Jump to Bookmark</a>

You can also link the bookmark from another page: <a href="html-hyperlink.html#bookmark">Jump to Bookmark</a>