a href html code example
Example 1: html links
<a href="url">link text</a>
Example 2: buton html href
<!-- if you are on Window : -->
<button onclick="window.location.href='page2.html'">
Button
</button>
<!-- if you are on linux or macOS : -->
<button onclick="location.href='page2.html'">
Button
</button>
Example 3: html link
<a href="https://www.google.com/">Link to google</a>
Example 4: html a href
<a href="http://example.com" >Link text</a>
Example 5: href html
<a href="link">text</a>
Example 6: a href tag
Actually href is a html attribute, which is used for passing page url to the a tag.
Example
<a href="url">Click here</a>