http://www.perlmonks.org?node_id=19188


in reply to RE: Automatic CODE tags
in thread Automatic CODE tags

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>).

  • Comment on RE: RE: Automatic CODE tags (kudra: how/why CODE &gt; PRE)

Replies are listed 'Best First'.
RE:(3) Automatic CODE tags
by swiftone (Curate) on Jun 21, 2000 at 20:44 UTC
    <Code> also HTML-ize's any special characters (ampersands, angle-brackets, etc)