You might have noticed the hashtag (#) at the end of a URL while browsing the web, something like this:
The links which contain # (hashtags) are known as Hash-Links
Reason for using hash-link
- The link will not point anywhere.
- The main point of using hashtags in the links, is to navigate between elements of the pages and not between pages.
One of the common examples is the navigate-to-top feature on many websites.
<body id="top"> // adding anchor tag to navigate to top <a href="#top">Go to top</a> </body>
Follow me on Twitter
Liked my content? Buy me a coffee to fuel my work. Thanks for reading!