How to link pages using relative URL in HTML?

HTMLWeb DevelopmentFront End Technology

To link pages using relative URL in HTML, use the <a> tag with href attribute. Relative URL is used to add a link to a page on the website. For example, /contact, /about_team, etc.

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

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


You can try to run the following code to link pages using relative URL in HTML

Live Demo

<!DOCTYPE html>
      <title>HTML Relative URLs</title>
        Our <a href="/about/about_team.htm">Team</a> comprises of programmers,
           writers, and analysts.
Updated on 11-May-2020 10:57:55