Computer >> Computer tutorials >  >> Programming >> HTML

How to link pages using absolute URL in HTML?


To link pages using absolute URL in HTML, use the <a> tag with href attribute. Absolute URL is used to link an external website. For example https://www.qries.com/questions.php

Everything inside <a>…</a> tag becomes a hyperlink. Some of the attributes of <a> tag are listed below,

Sr.No.Attribute & Description
1Href
Specifies the URL
2Rel
Specifies the connection between current and linked document. Values can be nofollow, external, author, bookmark, etc.
3Target
Specify where the link will open. Values include _self, _parent, _self, etc


How to link pages using absolute URL in HTML?

Example

You can try the following code to link pages using absolute URL in HTML −

<!DOCTYPE html>
<html>
   <head>
      <title>HTML Absolute links</title>
   </head>
   <body>
      <h1>Qries</h1>
      <p>
         With <a href="https://www.qries.com/questions.php">Qries</a>,
         get information about different topics such as games, government, education,
         geology, sports, etc.
      </p>
   </body>
</html>