I want to show some code for some documentation. But whenever I try, the browser actually renders it as HTML rather than as text.
How do I stop this?
<pre>
<code class="html">
<div class="alert-wrap g--5">
<input type="checkbox" id="alert-check">
<label for="alert-check">CLOSE</label>
<div class="alert card">
<p>Surface rules! That is all.</p>
</div>
</div>
</code>
</pre>
You can use online converters.
<pre>
<code class="html">
<div class="alert-wrap g--5">
<input type="checkbox" id="alert-check">
<label for="alert-check">CLOSE</label>
<div class="alert card">
<p>Surface rules! That is all.</p>
</div>
</div>
</code>
</pre>
Online converters
http://www.accessify.com/tools-and-wizards/developer-tools/quick-escape/default.php