Re: paragraphs vs breaks



In article <1ar6kus3ujodj.dlg@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Jim S <jim@xxxxxxxxxxxxxxx> wrote:

On Wed, 23 Jul 2008 09:24:59 +1000, dorayme wrote:

In article <1nbk7idpvrzqe$.dlg@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Jim S <jim@xxxxxxxxxxxxxxx> wrote:

My use of the <br> tag has been criticised in favour of <p></p> paragraph
tags.
Since the latter involves 'before and after' line formatting, it seems to
be taking a sledgehammer to crack a nut.
I'm sure there must be a reason, but I can't see it.
Explain please.

Short answer:

You need to specify the exact case of the criticism. In some
circumstances it would be using a sledgehammer to crack a pea, in others
not.

Longer answer:

From my recollection of your pages, there are many pictures and
thumbnails, captions and explanations of pics... So I will address just
these two cases. One where there is a thumbnail or bigger and a caption.
Two, where there is a pic and some longer explanation or reference to
the picture.

One, it is quite acceptable to use a br if you are using an inline image
to place a few short words underneath the pic. If you do nothing, then
the words will...

Thanks again friend.
I cannot remember whether it was you or someone else, helping me some time
ago and I cannot find the article in question, but I was in the process of
ensuring that my pages conformed to 4.01 strict. I remember digging my
heels in over my use of tables as placeholders, but whoever it was, said
something to the effect that my repeated use of <br> instead of <p></p> was
against the 'spirit' what I had managed to achieve at that point.

It sounds like something I might say, I probably did. So now I am
thinking you are concerned about a slightly different matter to the one
I addressed in the last post: namely, the repeated use of <br>s to push
down text or other things. This is rather a different matter to the more
confined quandary I addressed before: namely the decision to choose
between using one br and using a block element like a p with suitable
styling.

What is wrong with using repeated <br>s to make vertical space between
one thing and another? To get to understand and feel that this is wrong
requires you to have some background. It is not easy to get this
background even though some people think it might be. I will sketch some
of the things that in my opinion you need (but I do not really supply):

You need to have a good grasp of the idea that content can be separated
from style. That the HTML is the vehicle for the content and the CSS for
the style. Content is the information to be conveyed, style is the way
that information is presented; the order, the look, the feel.

A really good grasp of this will not result in supposing that the
separation is a simple clean matter. It is not and there are many things
that cloud it, not just that there are many blatant presentational
elements in HTML 4.01 Strict but that it is almost impossible in
practice not to have an eye on the look of a page when one is marking up
the "bare bones" content.

Nevertheless, there is an intelligent ideal behind the idea of
separating content from style. If you accept this ideal and the reasons
for it, you will want to do things in its spirit.

You will not grab a lump of lorem ipsum text from your files and style
it white to go on a white background just to take up a set amount of
space (even though such a trick could be convenient short term), you
will not have different sized clear gifs on your desktop to be grabbed
and thrown into img elements and table cells to take up various spaces
(even though this might be short term convenient), and many of us would
also say, you will not use a <br> repeatedly just to take up vertical
space.

It is going against the idea of not using HTML for presentational
purposes. The vertical space you require is a style matter and the ideal
I mention requires you to give this task to CSS (a margin or padding
sounds like the tool needed).

There is another reason that some people give why repeated breaks are
bad. The reason sometimes given is that <br> mean to break a series of
inline objects and that it makes no sense to break a line twice. In
fact, almost all browsers happily respond to repeated breaks, as you
know. If browsers were as pure as some authors, perhaps they would not!
They might then simply ignore more than one <br> as they do with
repeated 'spacebar presses'.

--
dorayme
.



Relevant Pages

  • Re: paragraphs vs breaks
    ... This is rather a different matter to the more ... That the HTML is the vehicle for the content and the CSS for ... There is another reason that some people give why repeated breaks are ...
    (alt.html)
  • Re: The truth about NFL contracts.
    ... you fucking retard. ... >>> statementis the whole reason for the one you posted you fucking ... No matter what the reason, ... Does that seep thru your head, clown? ...
    (alt.sports.football.pro.ne-patriots)
  • Re: todays epiphany!
    ... arguments toward defending the executive branch of the federal ... government, no matter the mistakes made, no matter the lies told. ... me you're pointing out the obvious, and I'm not really sure the reason. ... views on which branch of government is mainly responsible for this mess. ...
    (rec.music.gdead)
  • Re: The Terrific Trio
    ... for that matter no engine of my own has ever pleased ... fundamental reason why TRM was doomed to failure: ... proof that any direct image implementation fundamentally necessarily ... native tongue makes you seem smart to me, but that doesn't matter in the ...
    (comp.databases.theory)
  • Re: Watch Out For Mikey
    ... who are so close to you as to be a stranger. ... or care for that matter. ... others have the time to think about you giving you reason to try to ... of the OCD person that Vegas thrives on. ...
    (alt.vacation.las-vegas)