line break

Discussion in 'HTML' started by David, Jun 10, 2007.

  1. David

    David Guest

    i'm fairly new to html so forgive me if this is a silly question

    i can't work out the difference between <br> and <br />
    both seem to work ok for me
    in what cirumstances should each be used?

    also to make paragraphs i've been using <br> to make a gap between text
    buut now i've found <p> </p>
    is it more proper to use <p> than <br> or doesn't it matter?

    thanks
    David, Jun 10, 2007
    #1
    1. Advertising

  2. Blinky the Shark, Jun 10, 2007
    #2
    1. Advertising

  3. David

    Ben C Guest

    On 2007-06-10, David <> wrote:
    > i'm fairly new to html so forgive me if this is a silly question
    >
    > i can't work out the difference between <br> and <br />
    > both seem to work ok for me
    > in what cirumstances should each be used?


    They mean the same. <br/> is XHTML, <br> is HTML. Most browsers will
    tolerate <br/> even in HTML, but that doesn't make it right, so use
    <br> if you're using HTML.

    Opinion of the gurus on alt.html etc. is that HTML is preferred over
    XHTML.

    > also to make paragraphs i've been using <br> to make a gap between text
    > buut now i've found <p> </p>
    > is it more proper to use <p> than <br> or doesn't it matter?


    Use <p> for paragraphs, <br> to break lines. What's the difference
    between starting a new paragraph and putting in a line break? You
    decide. If you use <p> there's more flexibility when it comes to styling
    the paragraphs with CSS.

    In XHTML you have to close paragraphs with </p>. In HTML you don't.
    Ben C, Jun 10, 2007
    #3
  4. David

    M Guest

    "Ben C" <> wrote in message
    news:...
    > On 2007-06-10, David <> wrote:
    >> i'm fairly new to html so forgive me if this is a silly question


    > They mean the same. <br/> is XHTML, <br> is HTML. Most browsers will
    > tolerate <br/> even in HTML, but that doesn't make it right, so use
    > <br> if you're using HTML.


    Not sure but I think the space is required if using it in HTML.

    There may be issues with line spacing wrt to using paragraph tags versus
    line returns.

    M
    M, Jun 10, 2007
    #4
  5. David

    Ben C Guest

    On 2007-06-10, M <> wrote:
    > "Ben C" <> wrote in message
    > news:...
    >> On 2007-06-10, David <> wrote:
    >>> i'm fairly new to html so forgive me if this is a silly question

    >
    >> They mean the same. <br/> is XHTML, <br> is HTML. Most browsers will
    >> tolerate <br/> even in HTML, but that doesn't make it right, so use
    >> <br> if you're using HTML.

    >
    > Not sure but I think the space is required if using it in HTML.


    Do you mean <br /> as opposed to <br/>? You may be right, but either is
    wrong really in HTML.

    > There may be issues with line spacing wrt to using paragraph tags versus
    > line returns.


    Assuming you mean <br> by line return, yes the spacing is different.
    <br> starts a new line wherever a new line should start, which is given
    by the height of the previous line. But paragraphs are new block boxes
    and usually have some top and bottom margin set on them by the default
    stylesheet.
    Ben C, Jun 10, 2007
    #5
  6. David wrote:

    > i'm fairly new to html so forgive me if this is a silly question
    >
    > i can't work out the difference between <br> and <br />
    > both seem to work ok for me
    > in what cirumstances should each be used?
    >
    > also to make paragraphs i've been using <br> to make a gap between
    > text buut now i've found <p> </p> is it more proper to use <p> than
    > <br> or doesn't it matter?


    And now to answer the real question: use <p> ... text ... </p> for your
    paragraphs. Do not use any flavor of <br> for line breaks, except
    perhaps in poetry.

    <p>
    Listen my children and you shall hear<br>
    of the midnight ride of Paul Revere.<br>
    He got in his car, stepped on the gas<br>
    the seat fell out, and he skinned his knee.
    </p>

    --
    -bts
    -Motorcycles defy gravity; cars just suck
    Beauregard T. Shagnasty, Jun 11, 2007
    #6
  7. David

    andrew Guest

    On 2007-06-11, Beauregard T. Shagnasty <> wrote:

    [....]
    > Do not use any flavor of <br> for line breaks, except
    > perhaps in poetry.
    >
    ><p>
    > Listen my children and you shall hear<br>
    > of the midnight ride of Paul Revere.<br>
    > He got in his car, stepped on the gas<br>
    > the seat fell out, and he skinned his knee.
    ></p>


    Mind you I wrestled with poetry issues when I was publishing my
    father's family history site and I settled on a styled pre element,
    rather than multiple <br>. An
    example can be seen half way down this page('Why are the waves rolling
    ...'):

    http://www.strong-family.org/foster/chapter_5.html

    Perfect for poetry with shorter lines, with longer lines you would
    have to style the overflow.

    Andrew


    --
    Andrew's Corner
    http://people.aapt.net.au/~adjlstrong/dapper.html
    andrew, Jun 11, 2007
    #7
  8. David

    dorayme Guest

    In article
    <kI0bi.73510$>,
    "Beauregard T. Shagnasty" <> wrote:

    > Do not use any flavor of <br> for line breaks, except
    > perhaps in poetry.


    Is this not too severe? For example, on some occasions with
    pictures, there is nothing wrong with using <br> to make a
    comment or caption appear underneath the picture.

    --
    dorayme
    dorayme, Jun 11, 2007
    #8
  9. dorayme wrote:

    > "Beauregard T. Shagnasty" <> wrote:
    >> Do not use any flavor of <br> for line breaks, except
    >> perhaps in poetry.

    >
    > Is this not too severe? For example, on some occasions with
    > pictures, there is nothing wrong with using <br> to make a
    > comment or caption appear underneath the picture.


    There are exceptions to every rule. <g>

    --
    -bts
    -Motorcycles defy gravity; cars just suck
    Beauregard T. Shagnasty, Jun 11, 2007
    #9
  10. andrew wrote:

    > On 2007-06-11, Beauregard T. Shagnasty <> wrote:
    > [....]
    >> Do not use any flavor of <br> for line breaks, except
    >> perhaps in poetry. [and addresses]

    >
    > Mind you I wrestled with poetry issues when I was publishing my
    > father's family history site and I settled on a styled pre element,
    > rather than multiple <br>. An example can be seen half way down this
    > page('Why are the waves rolling ..'):


    That will work as well. I didn't mention it because the OP was
    struggling with the use of <p>, and I didn't want to confuse him further
    at this early stage.

    --
    -bts
    -Motorcycles defy gravity; cars just suck
    Beauregard T. Shagnasty, Jun 11, 2007
    #10
  11. Beauregard T. Shagnasty wrote:
    > dorayme wrote:
    >
    >> "Beauregard T. Shagnasty" <> wrote:
    >>> Do not use any flavor of <br> for line breaks, except
    >>> perhaps in poetry.

    >>
    >> Is this not too severe? For example, on some occasions with
    >> pictures, there is nothing wrong with using <br> to make a
    >> comment or caption appear underneath the picture.

    >
    > There are exceptions to every rule. <g>


    The exception to that rule is that some rules have no exceptions. :)


    --
    Blinky RLU 297263
    Killing all posts from Google Groups
    The Usenet Improvement Project: http://blinkynet.net/comp/uip5.html
    Blinky the Shark, Jun 11, 2007
    #11
  12. dorayme wrote:
    > In article
    > <kI0bi.73510$>,
    > "Beauregard T. Shagnasty" <> wrote:
    >
    >> Do not use any flavor of <br> for line breaks, except
    >> perhaps in poetry.

    >
    > Is this not too severe? For example, on some occasions with
    > pictures, there is nothing wrong with using <br> to make a
    > comment or caption appear underneath the picture.
    >


    I would rather set the image to display as block and keep my options open.

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Jun 11, 2007
    #12
  13. David

    dorayme Guest

    In article
    <9g2bi.73743$>,
    "Beauregard T. Shagnasty" <> wrote:

    > dorayme wrote:
    >
    > > "Beauregard T. Shagnasty" <> wrote:
    > >> Do not use any flavor of <br> for line breaks, except
    > >> perhaps in poetry.

    > >
    > > Is this not too severe? For example, on some occasions with
    > > pictures, there is nothing wrong with using <br> to make a
    > > comment or caption appear underneath the picture.

    >
    > There are exceptions to every rule. <g>


    Oy! That's my line...

    --
    dorayme
    dorayme, Jun 11, 2007
    #13
  14. David

    dorayme Guest

    In article <749d$466cbaa9$40cba7c0$>,
    "Jonathan N. Little" <> wrote:

    > dorayme wrote:
    > > In article
    > > <kI0bi.73510$>,
    > > "Beauregard T. Shagnasty" <> wrote:
    > >
    > >> Do not use any flavor of <br> for line breaks, except
    > >> perhaps in poetry.

    > >
    > > Is this not too severe? For example, on some occasions with
    > > pictures, there is nothing wrong with using <br> to make a
    > > comment or caption appear underneath the picture.
    > >

    >
    > I would rather set the image to display as block and keep my options open.


    Sometimes in life, Jonathan, you have to make a decision. You
    cannot keep thinking of the future like this. You will get an
    ulcer. Sometimes you just have to seize the moment and close off
    all options and not worry. Forever leaving things open is too
    post-modernist for all tastes.

    --
    dorayme
    dorayme, Jun 11, 2007
    #14
  15. David

    dorayme Guest

    In article <>,
    Blinky the Shark <> wrote:

    > Beauregard T. Shagnasty wrote:
    > > dorayme wrote:
    > >
    > >> "Beauregard T. Shagnasty" <> wrote:
    > >>> Do not use any flavor of <br> for line breaks, except
    > >>> perhaps in poetry.
    > >>
    > >> Is this not too severe? For example, on some occasions with
    > >> pictures, there is nothing wrong with using <br> to make a
    > >> comment or caption appear underneath the picture.

    > >
    > > There are exceptions to every rule. <g>

    >
    > The exception to that rule is that some rules have no exceptions. :)


    Actually, this is quite an interesting idea, as in paradoxical
    (as in it makes the head hurt thinking about it).

    But before getting into this, perhaps it can just be side stepped
    because "There are exceptions to every rule" is not a rule but a
    claim. Either true or false. I suspect it is false. But that a
    closely related claim, in the spirit of it, is true, namely that
    most rules we use have at least a few reasonable exceptions.

    --
    dorayme
    dorayme, Jun 11, 2007
    #15
  16. David

    Ben C Guest

    On 2007-06-11, dorayme <> wrote:
    > In article <>,
    > Blinky the Shark <> wrote:
    >
    >> Beauregard T. Shagnasty wrote:
    >> > dorayme wrote:
    >> >
    >> >> "Beauregard T. Shagnasty" <> wrote:
    >> >>> Do not use any flavor of <br> for line breaks, except
    >> >>> perhaps in poetry.
    >> >>
    >> >> Is this not too severe? For example, on some occasions with
    >> >> pictures, there is nothing wrong with using <br> to make a
    >> >> comment or caption appear underneath the picture.
    >> >
    >> > There are exceptions to every rule. <g>

    >>
    >> The exception to that rule is that some rules have no exceptions. :)

    >
    > Actually, this is quite an interesting idea, as in paradoxical
    > (as in it makes the head hurt thinking about it).


    It's a good one. I think it's called a Goedel sentence.
    Ben C, Jun 11, 2007
    #16
  17. OT Godel, et al. (was Re: line break)

    Ben C wrote:
    > On 2007-06-11, dorayme <> wrote:
    >> In article <>,
    >> Blinky the Shark <> wrote:
    >>
    >>> Beauregard T. Shagnasty wrote:
    >>> > dorayme wrote:
    >>> >
    >>> >> "Beauregard T. Shagnasty" <> wrote:
    >>> >>> Do not use any flavor of <br> for line breaks, except
    >>> >>> perhaps in poetry.
    >>> >>
    >>> >> Is this not too severe? For example, on some occasions with
    >>> >> pictures, there is nothing wrong with using <br> to make a
    >>> >> comment or caption appear underneath the picture.
    >>> >
    >>> > There are exceptions to every rule. <g>
    >>>
    >>> The exception to that rule is that some rules have no exceptions. :)

    >>
    >> Actually, this is quite an interesting idea, as in paradoxical
    >> (as in it makes the head hurt thinking about it).

    >
    > It's a good one. I think it's called a Goedel sentence.


    Anyone in here ever read Doug Hofstadter's "Gödel, Escher, Bach: An
    Eternal Golden Braid"? It's what got me into computers/computing as a
    hobby, way back. And what actually got me thinking, again, after I'd
    been out of college for a while. More than when I'd been *in* college,
    come to think of it.

    http://tal.forum2.org/geb

    http://www4.ncsu.edu/unity/lockers/users/f/felder/public/kenny/papers/godel.html

    --
    Blinky RLU 297263
    Killing all posts from Google Groups
    The Usenet Improvement Project: http://blinkynet.net/comp/uip5.html
    Blinky the Shark, Jun 11, 2007
    #17
  18. David

    david Guest

    Thanks Ben and everyone else for your explanations.

    David



    "Ben C" <> wrote in message
    news:...
    > On 2007-06-10, David <> wrote:
    >> i'm fairly new to html so forgive me if this is a silly question
    >>
    >> i can't work out the difference between <br> and <br />
    >> both seem to work ok for me
    >> in what cirumstances should each be used?

    >
    > They mean the same. <br/> is XHTML, <br> is HTML. Most browsers will
    > tolerate <br/> even in HTML, but that doesn't make it right, so use
    > <br> if you're using HTML.
    >
    > Opinion of the gurus on alt.html etc. is that HTML is preferred over
    > XHTML.
    >
    >> also to make paragraphs i've been using <br> to make a gap between text
    >> buut now i've found <p> </p>
    >> is it more proper to use <p> than <br> or doesn't it matter?

    >
    > Use <p> for paragraphs, <br> to break lines. What's the difference
    > between starting a new paragraph and putting in a line break? You
    > decide. If you use <p> there's more flexibility when it comes to styling
    > the paragraphs with CSS.
    >
    > In XHTML you have to close paragraphs with </p>. In HTML you don't.
    david, Jun 11, 2007
    #18
  19. dorayme wrote:

    > Sometimes in life, Jonathan, you have to make a decision. You
    > cannot keep thinking of the future like this. You will get an
    > ulcer. Sometimes you just have to seize the moment and close off
    > all options and not worry. Forever leaving things open is too
    > post-modernist for all tastes.
    >


    Ah, nope! I'm the kinda guy that is always looking forward! It's those
    10-years-older Denise Hoppers that live in the "now"

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Jun 11, 2007
    #19
  20. David

    Ben C Guest

    Re: OT Godel, et al. (was Re: line break)

    On 2007-06-11, Blinky the Shark <> wrote:
    > Ben C wrote:
    >> On 2007-06-11, dorayme <> wrote:
    >>> In article <>,
    >>> Blinky the Shark <> wrote:
    >>>
    >>>> Beauregard T. Shagnasty wrote:

    [...]
    >>>> > There are exceptions to every rule. <g>
    >>>>
    >>>> The exception to that rule is that some rules have no exceptions. :)
    >>>
    >>> Actually, this is quite an interesting idea, as in paradoxical
    >>> (as in it makes the head hurt thinking about it).

    >>
    >> It's a good one. I think it's called a Goedel sentence.

    >
    > Anyone in here ever read Doug Hofstadter's "Gödel, Escher, Bach: An
    > Eternal Golden Braid"? It's what got me into computers/computing as a
    > hobby, way back. And what actually got me thinking, again, after I'd
    > been out of college for a while. More than when I'd been *in* college,
    > come to think of it.


    No but it sounds interesting. Thanks for the links, that Gary Felder
    site is very good.

    > http://tal.forum2.org/geb
    >
    > http://www4.ncsu.edu/unity/lockers/users/f/felder/public/kenny/papers/godel.html
    >
    Ben C, Jun 11, 2007
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hugo
    Replies:
    10
    Views:
    1,290
    Matt Humphrey
    Oct 18, 2004
  2. kaushikshome
    Replies:
    4
    Views:
    753
    kaushikshome
    Sep 10, 2006
  3. Replies:
    12
    Views:
    935
  4. scad
    Replies:
    23
    Views:
    1,139
    Alf P. Steinbach
    May 17, 2009
  5. Marek Stepanek
    Replies:
    12
    Views:
    399
    Peter J. Holzer
    Sep 2, 2006
Loading...

Share This Page