I want to display HTML in a webpage. I've wrapped in a code block but the last two lines still execute/render. What am I doing wrong?
<pre><code>
div {background: brown;}
div.bluebg {background: blue;}
<div>default brown background</div>
<div class="base">blue background</div>
</code></pre>
The last two lines were wrapped in div tags. I notice stackoverflow strips them out. I don't want to strip them but modify I guess with < and >
. Is there a listing of tags that should be modified to render them in a webpage? Is there an online program that can convert these to the above syntax?