HTML lets users navigate through the web pages using HTML links. One of the options that HTML provides to users is to add links to text.
<a> tag is used for creating a link in HTML, followed by the
href property containing the redirected path.
Any text occurring between the opening and closing of this tag acts as a link to a URL.
HTML caters to two types of links:
Links that require the complete URL of a web page are known as absolute links. These are the pages that are usually considered external to the website. In the examples below,
target represents the way a link opens in the browser.
<a href="https://www.google.com" target="_blank">Absolute Link Text.</a>
Links that are local to the website are known as relative links. These usually refer to web pages that are already present in the directory in which the website resides.
<a href="home.html" target="_blank">This text will redirect the user to the home page of the website.</a>
title property provides additional information related to the link used in
href. This information is visible when the mouse hovers on the link.
View all Courses