Thursday 26 September 2013

html - What is href=# and why is it used? - Stack Overflow

html - What is href=# and why is it used? - Stack Overflow

On many websites I often see links that have href=#. What does it mean? What is it used for?
asked Jan 31 '11 at 19:34

Mark Rucker
1,575626

Samir Ghobriledited Aug 20 at 19:25






Putting the "#" symbol as the href for something means that it points not to a different URL, but rather to another id or name tag on the same page. For example:
<a href="#bottomOfPage">Click to go to the bottom of the page</a>
blah blah
blah blah
...
<a id="bottomOfPage"></a>
However, if there is no id or name then it goes "no where."
Here's another similar question asked HTML Anchors with 'name' or 'id'?