title: Dynamically adding anchor to paragraph element is not working
body: <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  
  &lt;head&gt;
      &lt;title&gt;&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div&gt;
      &lt;p id="test"&gt;&lt;/p&gt;
  &lt;/div&gt;
  &lt;script&gt;
      var newLink = document.createElement('a'); // #1
      newLink.href = 'http://google.fr'; // #2
      document.getElementById('test').appendChild(newLink); // #3
  &lt;/script&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This is not working, and I can't understand why.</p>
  
  <ol>
  <li>I create a new element <code>&lt;a&gt;</code>  </li>
  <li>I add the href to this element (<code>&lt;a href="http://google.fr"&gt;</code>)  </li>
  <li>I tell JS to go and find <code>test</code> and add this element to the <code>&lt;p&gt;</code> tag which has <code>test</code> as an ID.  </li>
  </ol>
  
  <p><strong>Why it is not working?</strong></p>