J
Jim Scott
Is it a debateable point or 'whatever suits' as to whether test is
presented using <p> or <br> tags?
presented using <p> or <br> tags?
Jim said:Is it a debateable point or 'whatever suits' as to whether test is
presented using <p> or <br> tags?
Jim said:Is it a debateable point or 'whatever suits' as to whether test is
presented using <p> or <br> tags?
Not quite.Neither - it's very clear.
<p>Marks the boundaries of a paragraph. <br> is an inline element that
marks a line break, where it occurs _within_ some piece of text. That's
really all there is to it - it's pretty clearly stated, if only you
follow the HTML spec through in detail.
<br><br> is always wrong. You've broken the line once, how do you break
it a second time?
If you want a debate, then it's less clear-cut when you should use <p>
and <div>. Obviously <p> is used for paragraphs and <div> should be
used for "chunks fo text that aren't a grammatical paragraph", but this
is a viable grammar question about similar HTML constructs when <p> vs.
<br> is really comparing chalk and cheese.
Jim said:On my site, which is almost all pictures with text, using <br> avoids a space
appearing between the text and the picture or is that because I use </p>?
Jim said:On my site, which is almost all pictures with text, using <br> avoids a space
appearing between the text and the picture or is that because I use </p>?
And if you have got a image with some subtitle or description use aAndy said:What's a "space" ? Sounds like a presentation issue, in which case
don't worry about it in the HTML, leave it to the CSS.
If you <img> is part of the same para as the text, then use <br>
between them.
If your test is a separate paragraph beneath the image (or above, or
alongside it) then use <p>...</p> and put the <img> elsewhere.
<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.
there are plenty of
cases that would have a double BR making your code more readable.
Andy said:Obviously <p> is used for paragraphs and <div> should be
used for "chunks fo text that aren't a grammatical paragraph"
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.
heart of the Pythagorean Theorem. said:The P tag simply helps you to define a paragraph
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.
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.
The P tag simply helps you to define a paragraph 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.
John said:Just out of curiosity, where did you get that quote from?
Do you mean more readable in a text editor? If so, why would you use an
HTML tag for this?
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.
The P tag simply helps you to define a paragraph 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.
All cases where you want a two-line space can be handled with CSS.
Jim said:If you come in the middle of a thread, please read what went before.
I am trying to avoid a 'whitespace' as I now know it is called
(jargon bluddy jardon) not create one extra.
Jim said:On my site, which is almost all pictures with text, using <br> avoids a space
appearing between the text and the picture or is that because I use </p>?
Toby said:Also, note that "</p>" is an optional tag.
Jim said:If you come in the middle of a thread,
please read what went before.
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.