Skip to main content

Command Palette

Search for a command to run...

What is hashtag # in links?

Published
•1 min read
What is hashtag # in links?
D

I am 17 years old and a young passionate and self-taught frontend web developer and have an intention to become a successful developer. I usually write about JavaScript and Web Development and share some tips in the articles.

You might have noticed the hashtag (#) at the end of a URL while browsing the web, something like this:

"https://google.com/#app"

The links which contain # (hashtags) are known as Hash-Links

  • 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!

More from this blog

D

Dhairya Shah

119 posts