Results 1 to 9 of 9

Thread: <p>

  1. #1
    Join Date
    Dec 2005
    Location
    Canada
    Posts
    82
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default <p>

    What is the point of the <p> paragraph tag? What does it do concerning... well... pretty much anything? I have only used the <br> tag in the past, and set up paragraphs in that fashion. What does it develop?

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    It's a tag to contain paragraphs.
    I have only used the <br> tag in the past
    <br> is meant for special purposes, such as line breaks within the same paragraph, or line breaks in something that is not a paragraph, such as a postal address or verse of poetry.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Technically, <p> is better. Or something.
    But I usually just use <br> myself.
    The exception would be if I was writing actual paragraphs.
    I hate the double line break of <p>, so I just use <br>.
    Though, yes, technically, <p> is better, so don't neccessarily take my word for it.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I hate the double line break of <p>
    There is no double line break. There's a line break, some padding, and some margin. If you don't like it, style it.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Are you sure there isn't a double line break in <p>? Anyway...
    - Mike

  6. #6
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Well, whatever you call it, there is the space of two line breaks. There is a line break, plus the "padding", that acts as a blank line.
    And, you didn't say WHY <p> is better. Any reason?
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  7. #7
    Join Date
    Sep 2005
    Posts
    882
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default

    Sematics, <p> is better than a <br> because it describes what the content is, not how it should look.

  8. #8
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    <br> Doesn't have a closing tag (</br> which is invalid). <p> is for containing a paragraph (<p>Some paragraph</p>) and then you can use <br>'s inside of it. I don't think there's any problem with using only <br> though. Personally, I find <br> better for spacing text and what-not.
    - Mike

  9. #9
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    blm126 is exactly right. A paragraph may be handled differently depending on what's parsing the data; a screenreader, for example, might pause before starting a new paragraph.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

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
  •