I have created a custom app for texts heading and add options for adding id to the DOM element or the given div.
Then add custom links in the page using the id of DOM eg:
sites/OperationsPeople#M
Some time this anchor tag navigates successfully but some time it doesn't work in the SharePoint page.
sites/OperationsPeople/SitePages/<HomePage>.aspx#M
. Replace<HomePage>
with the name of home page of site.