How to achieve anchor links on top of pages.

If you’re trying to do this just for anchor links within your current WP page, a table of contents style plugin will likely suffice; for example, see: http://wordpress.org/plugins/table-of-contents-plus/

This specific example auto-generates the table of contents and anchors based on the headers in your document/page, so it is fairly low fuss on you as the end user.