title: Html how to make H1, H2, etc as links?
body: <p>What is the correct code for turning a h1, h2 etc heading into a link and <code>search engines</code> index texts of header and link both?</p>
  
  <p>Is it:</p>
  
  <pre><code>&lt;a href="#"&gt;&lt;h1&gt;heading&lt;/h1&gt;&lt;/a&gt;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>&lt;h1&gt;&lt;a href="#"&gt;heading&lt;/a&gt;&lt;/h1&gt;
  </code></pre>
  
  <p>and could anyone explain why ?</p>