title: Using jQuery to test if string contains HTML markup
body: <p>I want to test if a string has html tags in it. </p>
  
  <pre><code>html = "&lt;p class=\"c\"&gt;some &lt;span&gt;conten&lt;b class=\"i\"&gt;t&lt;/b&gt;&lt;/span&gt;&lt;p&gt;&lt;p&gt;more content&lt;/p&gt;&lt;p&gt;&lt;i&gt;important&lt;/i&gt;";
  </code></pre>
  
  <p>I would think that using either <code>find()</code> or <code>has()</code> would help me do this, but it's not working. </p>
  
  <pre><code>$(html).find("p") //[]
  $(html).has("p")  //[]
  </code></pre>
  
  <p>And I get confusing results if I experiment.</p>
  
  <pre><code>$(html).has("p") //[]
  $(html).has("*") //array of &lt;p&gt; elements and children
  $(html).has("*") == true //false
  $(html).has("*").length == true //false ??
  </code></pre>
  
  <p>Why can't I use any of these methods to see if my string contains HTML markup?</p>
  
  <p>Thanks</p>