This seems a bit old school, tbh... I prefer what GitHub does - it adds the following inside the `<h1>` elements and makes them clickable on hover. 
For example: 
https://github.com/marcoscaceres/webidl.js#webidljs

Becomes: 
```
<h1>
    <a class="anchor" href="#webidljs" name="webidljs">
        <span class="octicon octicon-link"></span>
    </a>
    webidl.js
</h1>
```

IMO, that's much more useful... it also matches more closely specs like WebIDL. 

For example, hover over the headings here: 
http://www.w3.org/TR/WebIDL/#idl-implements-statements

I think WebIDL (and other specs) use something similar.