title: Are there two ways to jump to a fragment identifier in HTML?
body: <p>I always thought the standard way to specify a fragment identifier is by <code>&lt;a name="foo"&gt;&lt;/a&gt;</code>.</p>
  
  <pre><code>&lt;a href="#foo"&gt;go to foo&lt;/a&gt;
  
  &lt;a name="foo"&gt;&lt;/a&gt;                        &lt;!-- obsolete method, it seems --&gt;
  &lt;p&gt;some content under that anchor with name&lt;/p&gt;
  </code></pre>
  
  <p>But it seems like this is the old way, and the new way is using an <code>id</code>, like this:</p>
  
  <pre><code>&lt;a href="#bar"&gt;go to bar&lt;/a&gt;
  
  &lt;p id="bar"&gt;some content under that p with id&lt;/p&gt;
  </code></pre>
  
  <p>In fact, the W3C validator says that <code>name</code> is obsolete for the <code>&lt;a&gt;</code> element.  So are there 2 ways to jump to the fragment identifier but 1 of them is obsolete?  (And when did that happen?)</p>
  
  <p>(there are other questions about the difference between <code>id</code> and <code>name</code>, but this one is about fragment identifier)</p>