JS to show HTML tags
<p>For example, I have a test page like this:</p>

<p>index.html:</p>

<pre><code>&lt;p&gt;This is how you should write paragraphs in HTML:&lt;/p&gt;

&lt;div id="example"&gt;

    &lt;p&gt;Foo&lt;/p&gt;

&lt;/div&gt;
</code></pre>

<p>If I open this page in the browser, I want to see both text and tags:</p>

<pre><code>This is how you should write paragraphs in HTML:

&lt;p&gt;Foo&lt;/p&gt;
</code></pre>

<p>How it may be automatically done with js?</p>

<p>Yes, I can manually replace <code>&lt;</code> and <code>&gt;</code> by <code>&amp;lt;</code> and <code>&amp;gt;</code>, but I want to avoid manual work.</p>