paragraphs vs breaks

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'.
 
A

Art Sackett

My pages largely consist of photos with some text. Arranging this is
simple if I add a <br> or two. If I use <p></p> then, unless I tell it
not to do so, then I will get a 'margin' between the photo and the text
for example.

There are several syntactically valid constructs that will approximately
accomplish the layout you desire, so if that's your only concern than
just go with whatever makes you happiest, or least miserable. That said,
I suggest:

<p><img src="house.jpg"...><br>
This house typifies the architecture of Elbonia. Note the...
</p>

I recommend markup of this style because it uses HTML elements in
accordance with their generally recognized meanings so is the most human
friendly. After all, the web browsers themselves for the most part don't
care what kind of syntactically valid markup you throw at them, but the
people who maintain that markup do. However, if you're the only one who
will ever be called upon to maintain the markup and it makes sense to web
browsers (for some definition of "makes sense"), then Live Like You Want
To Live.
 
H

Harlan Messinger

richard said:
<p>
Within the context of the English journalistic communication area, a
paragraph is supposed to be a single train of thought. Ergo, if my
train of thought passes on to a second sub-topic, then I create a
second paragraph. Of which, both paragraphs could all be encompassed
within one single <p> tag. As demonstrated by the use of <p></p> tags
within this post.

?? Yes, they *could* be marked up in that incorrect manner, because we
are all capable of doing things incorrectly.
However, in the practices of html and web site presentation, a
paragraph is actually a formatted area of text.

In the practice of people whose practice is incorrect. Not only is it
incorrect, I don't understand why people would do this.
Whether or not that
area of text is actually in line with being the definition of a
paragraph.

Whereas, a break tag would be used to seperate two paragraphs for
easier reading.
</p>

How does separating them with <br> make them easier to read than
correctly marking them up with their separate <p></p> pairs?
 
M

Michael Fesser

..oO(richard)
<p>
Within the context of the English journalistic communication area, a
paragraph is supposed to be a single train of thought. Ergo, if my
train of thought passes on to a second sub-topic, then I create a
second paragraph. Of which, both paragraphs could all be encompassed
within one single <p> tag. As demonstrated by the use of <p></p> tags
within this post.
Wrong.

However, in the practices of html and web site presentation, a
paragraph is actually a formatted area of text. Whether or not that
area of text is actually in line with being the definition of a
paragraph.

Whereas, a break tag would be used to seperate two paragraphs for
easier reading.
</p>

I'd like to see how you then easily control the spacing between your
"paragraphs".

Micha
 
J

Jim S

Thanks again friend.
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'.

That explains it perfectly although putting it into practice may not be so
easy on so many pages.
Two other questions while you are here:
1. is it (thought) 'better' to use one super-stylesheet covering most/all
of a site or to use lots of smaller ones?
2. is it 'wrong' to use a transparent gif to hold a column width (right
column) as I have done here
http://www.jimscot.myby.co.uk/Jims_pictures/Jimspics_314_Helicopter.html
or to use a 'style' as here
http://www.jimscot.myby.co.uk/Jims_pictures/Jimspics_312_Helicopter.html
or is there another way - I just changed from using several &nbsp: to do
the same thing :eek:?
 
M

Michael Fesser

..oO(Jim S)
Two other questions while you are here:
1. is it (thought) 'better' to use one super-stylesheet covering most/all
of a site or to use lots of smaller ones?

Depends. Both methods have their benefits and drawbacks. Multiple small
stylesheets are easier to maintain, but require more HTTP connections,
which might slow down the download. One single big CSS requires just one
connection, but may contain a lot of stuff that's not required for most
pages.

Usually I do both. I have one big stylesheet for the main stuff and a
small number of extra stylesheets ("modules", if you want to call them
like that), for example for form stuff or all the classes that are used
by my scripts.
2. is it 'wrong' to use a transparent gif to hold a column width (right
column) as I have done here
http://www.jimscot.myby.co.uk/Jims_pictures/Jimspics_314_Helicopter.html

Not wrong, but bad style. It's how it was done back in the 80s.

Better, even though the same could be achieved without a table. A div
container with some left and right padding would look the same.

Micha
 
J

Jim S

.oO(Jim S)


Depends. Both methods have their benefits and drawbacks. Multiple small
stylesheets are easier to maintain, but require more HTTP connections,
which might slow down the download. One single big CSS requires just one
connection, but may contain a lot of stuff that's not required for most
pages.

Usually I do both. I have one big stylesheet for the main stuff and a
small number of extra stylesheets ("modules", if you want to call them
like that), for example for form stuff or all the classes that are used
by my scripts.


Not wrong, but bad style. It's how it was done back in the 80s.


Better, even though the same could be achieved without a table. A div
container with some left and right padding would look the same.

Micha

I actually changed those pages while you were answering to allow the
picture to stay on an 800x600 screen. However I almost knew the answer to
the padding thing while I was typing the question :eek:?
The stylesheet(s) thing like all my problems has multiplied as the site has
grown. I knew nothing about stylesheets when I began the site and now
nearly 500 pages later, the main site is covered by one external ss with
two smaller ones covering the bells section.
As for the div thing - it has been discussed at length before and I'll
stick with what I'm comfortable with - for now <g>
 
D

dorayme

Jim S said:
Two other questions while you are here:
1. is it (thought) 'better' to use one super-stylesheet covering most/all
of a site or to use lots of smaller ones?

I wish I could find a more comprehensive reply I made to this very
question a short while back. I need a secretary to take an interest in
my usenet activities! All applications considered. <g>

There is no correct answer to this. It all depends on the complexity of
the site, the sections and how they differ from each other and how you
think and work best. Perhaps wisest is to use one and if it becomes too
unwieldy for you, hive off a meaningful part of it. For example, you
might put everything to do with site navigation in a sheet.
2. is it 'wrong' to use a transparent gif to hold a column width (right
column) as I have done here
http://www.jimscot.myby.co.uk/Jims_pictures/Jimspics_314_Helicopter.html

Well, yes, in my opinion. It is almost exactly the sort of thing I
mentioned as an example of not good practice in my last reply to you
when I said: "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)"

I assume you are wanting to centre some things? I wold not use this way.
or is there another way - I just changed from using several &nbsp: to do
the same thing :eek:?

I can look tomorrow. Perhaps you might get some help on centering from my

<http://netweaver.com.au/centring/>
 
A

Andy Dingley

<p>
Within the context of the English journalistic communication area, a
paragraph is supposed to be a single train of thought.

If you ever suffer one, do write and let us know.
 

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,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top