I have some code inside an HTML document. The code itself is not important – I've used lorem ipsum to make this clear.
<pre><code>Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Sed sit amet diam sit amet sem accumsan faucibus ac in arcu.
Quisque varius, erat vel euismod ornare, libero orci laoreet velit, at lobortis sem nisl et eros.</code></pre>
I've applied white-space: pre-wrap
to the code block to force long lines to wrap as necessary. I'd like to know whether it's possible to indent the wrapped portion of the wrapped lines, to give something like this:
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Sed sit amet diam sit amet sem accumsan faucibus ac in arcu.
Quisque varius, erat vel euismod ornare, libero orci laoreet velit,
at lobortis sem nisl et eros.
` for formatting your code, especially for a case like this, in which you want to treat each line as a separately indented paragraph. And you will need to add more tags to your code if you want to do anything like syntax-highlighting.
– Brian Campbell Sep 21 '10 at 05:23