BR vs P

Discussion in 'HTML' started by Mark Shapiro, Dec 6, 2010.

  1. Mark Shapiro

    Mark Shapiro Guest

    I am old school, and code pages by hand using
    a plain text editor and FTP.

    I have a big site, and use <BR><BR> a lot.
    I've been told that it's better to use <P> </P>

    But when I do that, use <P>, the text appears a
    bit smaller and not as clean on most browsers
    and computers. Is it a sin to keep using <BR><BR>?



    --
    plugs:
    http://www.JudgmentBuy.com
    Mark Shapiro, Dec 6, 2010
    #1
    1. Advertising

  2. Mark Shapiro wrote:

    > I have a big site, and use <BR><BR> a lot.
    > I've been told that it's better to use <P> </P>


    It is. But it does not imply that you should change your site. In general,
    it is waste of resources and often a considerable risk to "clean up"
    existing pages.

    > But when I do that, use <P>, the text appears a
    > bit smaller and not as clean on most browsers
    > and computers.


    That's because your pages uses <font size = "4"> (which means "let the font
    size be one step larger than the size the user should be assumed to have
    chosen as most convenient to him"). The <p> markup is block level and
    therefore breaks, on many modern browsers, the effect of <font>.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Dec 6, 2010
    #2
    1. Advertising

  3. Gazing into my crystal ball I observed (Mark
    Shapiro) writing in news:1jt2h95.18ol33n78cnh2N%:

    > I am old school, and code pages by hand using
    > a plain text editor and FTP.
    >
    > I have a big site, and use <BR><BR> a lot.
    > I've been told that it's better to use <P> </P>
    >
    > But when I do that, use <P>, the text appears a
    > bit smaller and not as clean on most browsers
    > and computers. Is it a sin to keep using <BR><BR>?
    >
    >
    >


    The difference between BR and P is that P is for marking up a paragraph,
    and BR is a forced line break.

    The P element is a block level element, which means it has default top
    and bottom margin, about the same as <br><br>. You can use CSS to change
    the margin on paragraph(s), to be larger or smaller, as the case may be.
    Of course the advantage to this is that it is one change, instead of
    removing <br>'s to adjust the space.

    If you are using <br> to make the width of the text smaller, then there
    are several ways of doing this.

    1. Put the <p>'s inside of the containing div and adjust the width on
    that.
    2. Adjust the right and left margins on the <p> element.

    Remember, a <br> is a _FORCED_ line break. I use it sparingly, for
    headings, addresses, etc.

    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
    Adrienne Boswell, Dec 6, 2010
    #3
  4. Mark Shapiro

    dorayme Guest

    In article <1jt2h95.18ol33n78cnh2N%>,
    (Mark Shapiro) wrote:

    > I am old school, and code pages by hand using
    > a plain text editor and FTP.


    Reminds me of the childhood puzzle: "Charles the First walked and
    talked after he had his head cut off"

    --
    dorayme
    dorayme, Dec 6, 2010
    #4
  5. Mark Shapiro

    richard Guest

    On Mon, 6 Dec 2010 07:13:24 -0800, Mark Shapiro wrote:

    > I am old school, and code pages by hand using
    > a plain text editor and FTP.
    >
    > I have a big site, and use <BR><BR> a lot.
    > I've been told that it's better to use <P> </P>
    >
    > But when I do that, use <P>, the text appears a
    > bit smaller and not as clean on most browsers
    > and computers. Is it a sin to keep using <BR><BR>?


    Instead of <br><br> you could use <p></p> in one line and style it to give
    the separation desired.
    <p style="margin-bottom:20px;"></p>
    Personally, I don't listen to the nitpickers. If I want the double breaks,
    I use them.
    richard, Dec 6, 2010
    #5
  6. Mark Shapiro

    Mark Shapiro Guest

    richard <> wrote:

    > On Mon, 6 Dec 2010 07:13:24 -0800, Mark Shapiro wrote:
    >
    > > I am old school, and code pages by hand using
    > > a plain text editor and FTP.
    > >
    > > I have a big site, and use <BR><BR> a lot.
    > > I've been told that it's better to use <P> </P>
    > >
    > > But when I do that, use <P>, the text appears a
    > > bit smaller and not as clean on most browsers
    > > and computers. Is it a sin to keep using <BR><BR>?

    >
    > Instead of <br><br> you could use <p></p> in one line and style it to give
    > the separation desired.
    > <p style="margin-bottom:20px;"></p>
    > Personally, I don't listen to the nitpickers. If I want the double breaks,
    > I use them.


    Thanks guys, I decided to just stick with BRs as it would
    take days to change to Ps. For new pages I'll P it up.

    --

    http://www.JudgmentBuy.com
    Mark Shapiro, Dec 7, 2010
    #6
    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.

Share This Page