Re: <pre> versus <code> white-space:pre; when pasting
Spartanicus <[email protected]> Wed, 20 Jul 2005 06:50:18 GMT
| Newsgroups | gmane.comp.mozilla.devel.unix |
|---|---|
| Organization | None |
| Message-ID | <20trd1tref2rc9s42jtics584o13bv3o56@news.spartanicus.utvinternet.ie> |
Michael Shell <[email protected]> wrote: >Consider the XHTML document attached at the end of this post. >When viewed under Firefox 1.0.5 on Linux, highlighting >and pasting (into a text editor) the <pre> tag listing will >preserve formatting (white space and line feeds). However, this >is not true when doing the same with the <code> tag listing >(it will all be pasted on one line with multiple successive spaces >treated as a single space) despite the fact that "white-space:pre;" >was invoked via CSS. > >Is this considered correct behavior? >Do other browsers generally behave in this way? Yes x 2. >If so, it seems to me that it may prevent the use of the <code> >tag in lieu of the <pre> tag for a lot of source code <pre><code>foobar</code></pre> >This should make for an interesting discussion Hardly. -- Spartanicus