Update anchor_links.html.

* fix `TypeError` when we are in home
* remove default type and encoding
* format the code
Include anchor_links before the end closing `body` tag.