Why .html() don't output html tags? : <p>If i have a p element </p>

<pre><code>&lt;p&gt; simple text &lt;h3&gt; this is h3 text &lt;/h3&gt; &lt;/p&gt;
</code></pre>

<p>And  i do this.</p>

<pre><code> alert($('p').html());
</code></pre>

<p>It should give output  <code>simple text &lt;h3&gt; this is h3 text&lt;/h3&gt;</code></p>

<p>But it alerts only <code>simple text</code>. I thought Ok may be <code>.html()</code> does not output html tags </p>

<p>But when i add any html using jquery in same p element , And then alert in same way it gives me result which is expected(it shows html tags as well) . </p>

<p>This is example</p>

<p><a href="https://jsfiddle.net/04f1drby/" rel="nofollow noreferrer">https://jsfiddle.net/04f1drby/</a></p>

<p>Can someone explain why this different behaviour ?  Thanks in advance</p>
