Displaying HTML Properly

So nowadays, there are textareas hiding all over the place; displaying button codes, and being used for tutorials.

This isn't the right way to display HTML.

Instead of <textarea>, you should use <code> or <pre>.

Textareas are used for forms and commenting. Although they display can HTML, <code> or <pre> are correct.

When using <code> or <pre>, however, any < must be changed to &lt;.
Likewise, > must be changed to &gt;, like so:

<code>&lt;strong&gt; OTHER CODES &lt;/strong&gt;</code>

So instead of inserting <strong>, we insert &lt;strong&gt;.

It's easy to customise <code> with your CSS! Paste this into your CSS and edit to your liking.

code, pre {
display:block;
height: auto;
background: #eee;
font: normal 11px/12px georgia;
text-align: left;
padding: 3px;
}

Recent Updates

7/12 Updated link
7/12 Updated link
7/12 Updated link
7/12 Updated link
7/12 Updated link