Is it wise using <pre> tag in articles?

Discussion in 'HTML & Website Design' started by Mxa, Dec 17, 2009.

  1. #1
    I've ~900 articles and editing them with mass editor isn't an easy task. The articles are obviously done with line brakes and such which aren't displayed in HTML. So I'd like to ask whether there's some cons using <pre> tag or is it fine in this situation?
     
    Mxa, Dec 17, 2009 IP
  2. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #2
    Well, the first concern would be if the text even has word-wraps, or is entered as one big line. Given that PRE won't force wordwraps, long lines will bust out of their container. Likewise, assuming this is CONTENT and you are using dynamic fonts on your content like you are supposed to instead of declaring content font sizes in PX like some half-assed retard, if it's not a dynamic width site (or even if it is) the edge of the text could get chopped off depending on what you want to use for a site container approach, columns, etc.

    Second is that you would also NOT be using semantic markup. Are these paragraphs of text? Mark them up AS PARAGRAPHS. If it's a heading, use a HEADING tag.

    Which is why taking 900 articles and turning them into content is usually called work, not happy-happy funtime.

    That said, you could probably fast-track a lot of the work by simply writing a php script (or any other scripting language) to turn every time there's a double carriage return into a </p><p>, then add <p> at the beggining, </p> at the end, then go back through and make any headings into headings, lists into lists, etc, etc.
     
    deathshadow, Dec 17, 2009 IP
  3. pkgelectricals

    pkgelectricals Peon

    Messages:
    58
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    no,its not recommended
     
    pkgelectricals, Dec 26, 2009 IP