This matters mostly when we use java-script or jQuery. most of the time for links we use # to set empty url and run jquery onclick. but sometimes page scrolls up due to use of # tag.

Option 1

you can easily prevent href=”#” taking you to top of page by using bellow code.

$('.yourclass').click(function(e) {
e.preventDefault();
});

 

Option 2

You can use fault  ID like href=”#dsdposdsd”. In this case it try to find the ID but since ID is fake it stops at same position.