in reply to Test post for <code> and <pre>
G'day siberia-man,
There's a lot of good advice already. Here's some additional information, which I didn't see posted, and mostly reflects my usage (garnered over the last decade).
The <pre> tag is useful when the content contains non-ASCII characters which may be rendered as character references when <code> tags are used.
For in-line, as opposed to block, content I use the <tt> tag.
Everything already said about <pre> (e.g. escaping characters) also applies to <tt>.
Compare these smilies: ☺ and ☺ (the 1st uses <c>; the 2nd uses <tt>).
[Note: Rendering of non-ASCII characters may be dependent on various things such as browser capabilities and available fonts.]
Be aware that <code> tags wrap lines (the 2nd and subsequent parts are introduced with a +); however, <pre> tags won't do this. Keep an eye on the length of lines in <pre> blocks; and bear in mind that indentation from "Re:", "Re^2:", ..., "Re^N:" posts will affect wrapping.
You can nest <c> inside <code> and vice versa. The two pieces of markup I used there were: <code><c></code> and <c><code></c>.
You can enter [ and ] using [ and ], respectively; e.g. [not a link] which I marked up as just "[not a link]" (i.e. no tags needed here).
— Ken
|
|---|