title: Parsing HTML in javascript ?
body: <p>all</p>
  
  <p>I have a HTML input :<code>&lt;h5&gt;&lt;font face="times new roman, times, serif" size="7" style="color: #ff9696; "&gt;Sample&lt;/font&gt;&lt;/h5&gt; 
    &lt;ul&gt; &lt;/ul&gt;</code></p>
  
  <p>I want to extract everything and pass to javascript variables. For example, 
  font name, size, style color. Can I use RegEx?</p>
  
  <p>I have tried this but no use: </p>
  
  <pre><code>&lt;html&gt;
  
      &lt;script&gt;
          var input = '&lt;h5&gt;&lt;font face="times new roman, times, serif" size="7" style="color: #ff9696; "&gt;Krishanthan&lt;/font&gt;&lt;/h5&gt; &lt;ul&gt; &lt;/ul&gt;';
          var div = document.createElement('div');
  
          div.innerHTML = input;
  
          var size = div.getElementsByTagName('size')[0];
          var text = size.innerText || size.textContent;
  
          alert(text);
      &lt;/script&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>Please give me some suggestion...</p>
  
  <p>Thanks.</p>