SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Divs INSTEAD OF P tags?

    I have an ecommerce biz and I'm moving over to a new shopping cart platform. My old product descriptions have many different p class tags. A developer I am working with suggested that I:

    Use divs instead of p tags to "keep things clean". Would this be the best way to go?

    Most of my product descriptions are fairly long - 1-6 paragraphs and would sometimes use indented lists to list the specifications for a product.

    Any thoughts. Thanks... I've tried to read up on this prior to posting but most articles I find are on using divs instead of tables as it's a hot topic (or was...)

    Thanks in advance,

    Blayne

  2. #2
    SitePoint Wizard drhowarddrfine's Avatar
    Join Date
    Aug 2005
    Posts
    3,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Either your developer doesn't know what he's doing or there's a misunderstanding. Divs are not replacements for p tags. p describes paragraphs. divs are for structure. Keep the <p>.

  3. #3
    SitePoint Enthusiast ComputerGuru247's Avatar
    Join Date
    Jul 2006
    Location
    Wisconsin
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    He might be summarizing that you want your <p> tags inside of a <div>. That is quite possible. With the mass amount of information you have specified it wouldn't be bad to put all the <p>'s into their own container.
    Bryan

    Breakpoint Designs - Web Design, Logos, and more!

  4. #4
    Chillin like a Villain DaStuff's Avatar
    Join Date
    Jul 2003
    Location
    Huntington Beach
    Posts
    649
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you think of a div as a box with a <p> tag as a book:

    You can organize your books by placing them into the box... But you can't just write inside the box, it doesn't work...

    So as your developer to rephrase what he's referring to.. Most likely it's just structuring the page using div's. This is fine and highly approved b/c most pages out aren't optimized for speed or seo.
    • Follow the dancing banana

  5. #5
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks everyone. Very helpful. A nice welcome to the forums!

    Best,

    Blayne

  6. #6
    Mazel tov! bronze trophy kohoutek's Avatar
    Join Date
    Aug 2004
    Location
    Hamburg, Germany
    Posts
    4,248
    Mentioned
    30 Post(s)
    Tagged
    0 Thread(s)
    If he means eliminating an extraordinary amount identical classes, then it is indeed a lot more efficient and cleaner to use a container instead.

    e.g.
    Code:
      <p class="product">Some text ...</p>
      <p class="product">Some text ...</p>
      <p class="product">Some text ...</p>
      <p class="product">Some text ...</p>
      <p class="product">Some text ...</p>
      <p class="product">Some text ...</p>
    Is not as efficient as:

    Code:
      <div class="product">
       <p>Some text ...</p>
       <p>Some text ...</p>
       <p>Some text ...</p>
       <p>Some text ...</p>
       <p>Some text ...</p>
       <p>Some text ...</p>
      </div>

    In my opinion anyway.
    Last edited by kohoutek; Oct 5, 2006 at 01:15.
    Maleika E. A. | Rockatee | Twitter | Dribbble



  7. #7
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think you meant 'efficient'.

  8. #8
    Mazel tov! bronze trophy kohoutek's Avatar
    Join Date
    Aug 2004
    Location
    Hamburg, Germany
    Posts
    4,248
    Mentioned
    30 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Tyssen
    I think you meant 'efficient'.
    Yes, Tyssen. Thanks for the correction. I wrote that at too late a time. I'll edit the post.
    Maleika E. A. | Rockatee | Twitter | Dribbble




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
  •