tag making browsers close paragraphs
I\'m having an issue with the HTML below:
Some paragraph text
Get rid of the pre
tag altogether, and just give your span
style="white-space:pre"
. See this page for a description of other white-space
options.
<pre>
is basically saying <div style="white-space:pre">
; what you want is <span style="white-space:pre">
.
Paragraph tags cannot contain block-level elements:
http://www.w3.org/TR/html401/struct/text.html#h-9.3.1
pre
is a block level element.
You could instead set the CSS style white-space: pre
on your span if you desired to have pre
-like behavior in an inline element.
pre
is a block level element, it isn't allowed to be inside a span
if memory serves right.
You can find out by validating your HTML.