The href attribute specifies the URL of the page the link goes to (href attribute specifies the link’s destination).
We should use href attribute with <a> tag so it will be a hyperlink. This <a> tag should be used inside the <body>…</body> tags.
Syntax
Following is the syntax for the <a> tag, which uses href attribute to specify the link address.
<a href="link address">link text</a>
Example
Following is the example program to use href attribute in an HTML page.
<!DOCTYPE html>
<html>
<body>
<p><a href="https://www.Brave.com">Click this to navigate to the Brave home page</a></p>
</body>
</html>