HTML Links - Hyperlinks


❮ Previous Next ❯

What is an HTML Links?

HTML links is Hyperlinks, which is used to connect one webpage to another. This links are used to jump another pages of website.

<a href="url">Link Name</a>

The HTML <a> tag defines a hyperlink and href attributes is used to show the link of page destination.

Absolute Link & Relative Link

A link which have "https://www" with full address of website is known as absolute link. It is also known as external link.
A link with the internal page of website without "https://www" is known as relative link.

Example

<h2>Absolute URLs</h2>
<p><a href="https://htmlcsscoding.com">HTMLCSSCODING</a></p>
<p><a href="https://www.instagram.com" target="_blank">Instagram</a></p>

<h2>Relative URLs</h2>
<p><a href="index.html">Local Page</a></p>
<p><a href="about-us/index.html" target="_blank">About Us</a></p>
Try It »

target="_blank" is used to open pages in new tab

Bookmark Links

Bookmark link is used to jump at the specific part of the web page, if a web page is very long.

Example

<h2 id="C4">Title 4</h2>
<a href="#C4">Goto to Chapter 4</a>
Try It »