Click to See Complete Forum and Search --> : <p> or <div>?
Mr Initial Man
12-17-2009, 08:29 AM
Here is some sample information:
1. Thrust
(4-0)
8. Blanks
Now should the markup be
<p>1. Thrust</p>
<p>(4-0)</p>
<p>8. Blanks</p>
or
<div>1. Thrust</div>
<div>(4-0)</div>
<div>8. Blanks</div>
considering the lines aren't really paragraphs?
svidgen
12-17-2009, 10:36 AM
P should really only be used for strictly textual "paragraphs." They should not contain other block-level elements. And even then, I'd prefer the DIV over the P. Default styles and restrictions on P's have given me some troubles in the past ...
tracknut
12-17-2009, 11:42 AM
I realize it isn't on your list of options, but if anything, that looks like a list of things, to me.
Dave
svidgen
12-17-2009, 11:53 AM
Blasphemy!
The global structure of an HTML document (http://www.w3.org/TR/html401/struct/global.html#h-7.5.4) -> div
Text (http://www.w3.org/TR/html401/struct/text.html) -> p
Definitely the p element, unless the OP explains why random these characters appear on a page?
EDIT
http://fba.furtopia.org/History/playoffs.php?year=2009
list or table
Mr Initial Man
12-17-2009, 08:52 PM
I realize it isn't on your list of options, but if anything, that looks like a list of things, to me.
Dave
Well, if it were in a list, it would be like this:
<li>
<div class="team1">1. Thrust</div>
<div class="games">(4-0)</div>
<div class="team2">8. Blanks</div>
</li>
or
<li>
<p class="team1">1. Thrust</p>
<p class="games">(4-0)</p>
<p class="team2">8. Blanks</p>
</li>
CFHutton
12-18-2009, 08:49 AM
I have no idea what those pieces of text have to do with each other, so no way to give you a suggestion on how to treat them.
unigogo
12-19-2009, 10:19 AM
I think either is acceptable.