Add anchors to HTML templates