We may have seen on several websites,there is link or button called 'back to top'
link,which is used to take the users to top of the page.
Just give the Scroll position to (0,0)
Back to top
So,once we click on back to top link,it will take us to top.