Alternative to <pre> tag

I’m reading in a book that the <pre> tag is deprecated, is this so and what is the alternative?

Throw away the book. :wink: I’ve not heard anything like this, and pre is very handy.

Interesting, the book is this

Seems to be a good book, but on pg.33 it says that <pre> tags are deprecated. I use them quite frequently myself so was confused.

That looks like a book on PHP so maybe they were already misusing PRE in their code examples?

PRE is not ‘deprecated’ but some of it attributes are, i.e. the width attribute on the element. Maybe they meant to use CODE that designates a fragment of computer code.

<pre> is one of the most useful tags for outputting formatted array codes!

Hey, the “XHTML Bible” (part of the Bible tech series) published in 2004 (a colleague of mine has it) was advocating tables for layout. And supposedly the series itself is highly regarded for tech books. I told him to stop reading it. : )

Good you stopped him! because if he had continued he’d have got the following:
As your mind turns inward on itself, you forget everything else…

I could nearly accept if it was 2001 and as a last resort fallback for legacy Netscape 4.x bugs but 2004 is a complete joke!

I hope you began hissing and roaring too. Yes, I think I have seen online code extracts from that book that looked reasonable. Though something seriously went wrong if they were advocating TABLE layout, let alone in '04.