title: Javascript: can't add href to list item
body: <p>I am trying to add a new item to a list item. But the below code isn't adding Hyperlink to the list item  I want. Can someone please advise what's wrong?</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div&gt;
      &lt;ul id="list1"&gt;
        &lt;li&gt;Ut enim ad minim veniam.&lt;/li&gt;
        &lt;li&gt;Excepteur sint occaecat cupidatat non proident.&lt;/li&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>JavaScript:</p>
  
  <pre class="lang-js prettyprint-override"><code>//create new li element
  var newListItem = document.createElement("li");
  newListItem.textContent = "...ooo";
  var ulist = document.getElementById("list1");
  console.log("adding link..");
  newListItem.setAttribute('href', "http://www.msn.com");
  ulist.appendChild(newListItem);
  console.log("added item");
  </code></pre>