SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Guru
    Join Date
    Nov 2008
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Alternative to <pre> tag

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

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,112
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    Throw away the book. I've not heard anything like this, and pre is very handy.
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  3. #3
    SitePoint Guru
    Join Date
    Nov 2008
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Interesting, the book is this

    http://www.amazon.com/gp/product/032...JWGJZ0R3NWC2RX

    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.

  4. #4
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    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.

  5. #5
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,804
    Mentioned
    157 Post(s)
    Tagged
    3 Thread(s)
    <pre> is one of the most useful tags for outputting formatted array codes!
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  6. #6
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,271
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    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. : )

  7. #7
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by poes
    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.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •