Reply to Re: <p> or <br>

Your name:

Reply:


Posted by Harlan Messinger on 10/09/06 17:57

rvtol_pe@hotmail.com wrote:
>> <br><br> is always wrong. You've broken the line once, how do you break
>> it a second time?
>
> I don't see why this is wrong. BR is a single line break and there is
> nobody forbidding you to use 2 of them and it will validate correctly.

"Colorless green dreams sleep furiously" is a syntactically correct
English sentence that would would pass an English validator if one
existed, but it is also meaningless.

This is an example of
a sentence with a line break in it.

This is another example of



a sentence with a line break in it.

In each case, the sentence is broken in one place, i.e., there is *one*
line break. In the second example, I choose to make the two parts appear
farther apart than they normally would, and in an e-mail I have to use
multiple line break characters to make that happen, but still, the text
is broken only *once*. In HTML, <br> represents the fact of the line
being broken, and <br><br> is redundant; layout is controlled using
styles. If you want something that looks like this:

The equation

z^2 = x^2 + y^2

is the heart of the Pythagorean Theorem.

use styles.

..subquote { display: block; margin: 1em 0 1em 2em; }

<p>The equation <span class="subquote">z^2 = x^2 + y^2</span> is the
heart of the Pythagorean Theorem.</p>

> The P tag simply helps you to define a paragraph

It doesn't help you to define one. It denotes one.

> and to have some more
> flexibility when it comes to styling; however, there are plenty of
> cases that would have a double BR making your code more readable.

There are cases where extra spacing makes your code more readable. A
double BR isn't the correct way to accomplish that. Let's put it this
way: why is the amount of spacing created by two BRs necessarily what
you want? What if the desirable amount of space corresponds to 1.3 BRs?
What if the part after the break (as in the above example) shouldn't be
aligned with the part before it? Then what?

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация