Results 1 to 8 of 8

Thread: HTML: break tag [RESOLVED]

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2003
    Posts
    1,004

    HTML: break tag [RESOLVED]

    Is <br/> acceptable?
    Last edited by Darkwraith; Aug 26th, 2004 at 02:05 PM.
    "Can't" and "shouldn't" are two totally separate things.

    All questions should be answered. All answers should be true. That is why I post.

  2. #2
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    It's encouraged in XHTML 1.0

    Why do you ask?
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  3. #3
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    For backwards compatibility you should but a space after the r:
    Code:
    <br />
    As for a line break it's perfectly acceptable. You should not use it to seperate paragraphs though, that's where the p tag is for:

    Wrong:
    Code:
    long story...
    long story...long story...
    <br /><br />
    long story...long story...
    long story...
    Right:
    Code:
    <p>
    long story...
    long story...long story...
    </p>
    <p>
    long story...long story...
    long story...
    </p>
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2003
    Posts
    1,004
    I saw it in some HTML code and I was wondering if it was a malformed tag or a new standard.

    Thanks for the input.
    "Can't" and "shouldn't" are two totally separate things.

    All questions should be answered. All answers should be true. That is why I post.

  5. #5
    Frenzied Member vbNeo's Avatar
    Join Date
    May 2002
    Location
    Jutland, Denmark
    Posts
    1,994
    Originally posted by Jop
    For backwards compatibility you should but a space after the r:
    Code:
    <br />
    As for a line break it's perfectly acceptable. You should not use it to seperate paragraphs though, that's where the p tag is for:

    Wrong:
    Code:
    long story...
    long story...long story...
    <br /><br />
    long story...long story...
    long story...
    Right:
    Code:
    <p>
    long story...
    long story...long story...
    </p>
    <p>
    long story...long story...
    long story...
    </p>
    Since both solutions are perfectly valid, I suppose it's up to the one who writes the markup?
    "Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
    - Zack de la Rocha


    Hear me roar.

  6. #6
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    Well I personally tend to use tags for what they're made for. Using paragraphs makes life so much easier than just putting linebreaks everywhere. Ofcourse it works, but it's harder to maintain, harder to style etc. Ofcourse you can play soccer with a basketball, but that's not what they're made for. Please play soccer with a soccerball. Thank you.
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  7. #7
    Frenzied Member vbNeo's Avatar
    Join Date
    May 2002
    Location
    Jutland, Denmark
    Posts
    1,994
    Since XHTML 1.1 allows the creation of your own tags, the definition of one tag is suddenly changed, especially when using the box model... I think doing as you do might be a bit... old?
    "Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
    - Zack de la Rocha


    Hear me roar.

  8. #8
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    I don't think the defenition of the p or br tag has changed at all. But since the early days people are used to abusing tags, while making maintaing harder for themselves. It's now time to re-learn writing html in a good way.

    And what do you mean by "when using the box model", and more importantly, which of my code is old? Please eleborate.
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

Posting Permissions

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



Click Here to Expand Forum to Full Width