D
dorayme
Jim S said: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'.