Re: Source code to display "as is" (help!!)




jojo wrote:
Im not sure if I got your question right. Was it "How can I break a line
in any html-Block-element without using br-Tags"?
Then I suppose I have to ask what should be the need of doing so? There
is the br-Tag, so why not us it?

Maybe you _already_have_ a block of "preformatted" text which doesn't
include <br> but does include \n. If you're involved with automatic
publishing of text documents, without a huge CMS, then this is a common
occurrence.

There's also the issue that CSS whitespace: pre; (which is what the
default <pre> gives you) isn't the same as embedded <br>s. As well as
linebreaks, it also prevents whitespace being collapsed. Not only are
linebreaks preserved, but so are indents (and embedded whitespace).

Refs:
http://www.w3.org/TR/CSS21/text.html#white-space-prop

.