|
Posted by Jukka K. Korpela on 07/04/06 23:04
Mitja Trampus <nun@example.com> scripsit:
> Since PRE has no semantic meaning, I prefer to use
>
> <code class="snippet"> ... </code>
>
> in combination with
>
> code.snippet {
> display: block;
> white-space: pre;
> }
The PRE element has a meaning: it indicates a block of preformatted text.
(And it is a semantic meaning. "Semantic" means "relating to meaning", so
"semantic meaning" is just an emphatic expression for "meaning".)
On the practical side, your approach implies that in any non-CSS rendering
situation, the entire code snippet is rendered as running text, without
preserving whitespace. Besides, there will be problems in CSS-enabled
rendering, too, since support to white-space: pre is not universal.
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
[Back to original message]
|