• If I see this correct, SyntaxHighlighter uses a <pre>-tag to mark the text to be interpreted as highlightable code. Even though this should not affect the highlighter or the most user’s experience, wrapping the code into <code>, too, could probably make the output more useful.

Viewing 3 replies - 1 through 3 (of 3 total)
  • <code> is designed for inline stuff while <pre> is designed for code blocks.

    Probably best to stick to <pre>.

    Thread Starter hangy

    (@hangy)

    To be honest, I think that the <pre>-tag itself has no specific semantic meaning, but just the information that the text is preformatted and should be shown as it was entered in the markup.
    So <pre> is semantically irrelevant, thus <pre><code>…</code></pre>, as partly suggested e. g. by HTML Dog, might be the best way to mark-up code.

    <pre> itself is meaningless — just preformatted text, whereas <code> symbolizes code. I believe the standard is to use them together — <pre><code> which is more semantic.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Adjust output of SyntaxHighligher to use the code-tag?’ is closed to new replies.