BR vs P

M

Mark Shapiro

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>?
 
J

Jukka K. Korpela

Mark said:
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>.
 
A

Adrienne Boswell

Gazing into my crystal ball I observed (e-mail address removed) (Mark
Shapiro) writing in
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.
 
D

dorayme

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"
 
R

richard

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.
 
M

Mark Shapiro

richard said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top