This by no means represents the official reason, it's simply
my own thoughts on the reason behind the <code> tag.
It looks as if the tag is handled in a special way (just as
the square bracket links are). The fact that you can select
how code is displayed in user settings seems to indicate this.
Currently it looks as if the <code> tag is treated as
a <pre> tag.
One advantage of having the tag interpreted is that it's
easy to change what it does either globally or by user.
I imagine the term 'code' was chosen because the content
is, in fact, code, so it ought to be easy to remember.
Unfortunately it appears to be confusing as well. Using
<pre> would also be confusing, because there's no
guarantee <code> always is or will be directly
converted to <pre> (<code> seems to be
replaced with <pre><it> for me; if I turn
off 'large code font' in my user settings, it replaces
it with <pre><it><font size=-1>).
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|