Table rows and paragraphs

S

Samuel van Laere

I do not use tables very often so I wonder about this:

<tr>
<td><p>Achromaat</p></td>
<td><p>De persoon mist het kleuren zien ten gevolge van het ontbreken
van alle kegeltjes.</p></td>
</tr>

Are the paragraphs okay or are they not needed?
Is there a reason to use/not use paragraphs within a <td>?

My table is to found here, just in case one needs to see the bigger picture:
http://oukjeweb.com/tabel.html

cheers,
Samuel van Laere
 
B

Beauregard T. Shagnasty

Samuel said:
I do not use tables very often so I wonder about this:

<tr>
<td><p>Achromaat</p></td>
<td><p>De persoon mist het kleuren zien ten gevolge van het ontbreken
van alle kegeltjes.</p></td>
</tr>

Are the paragraphs okay or are they not needed?
Is there a reason to use/not use paragraphs within a <td>?

I would say they are superfluous in your <td>s. They do, however, lead
to semantic markup as you are actually including paragraphs of text in
the table.
My table is to found here, just in case one needs to see the bigger
picture: http://oukjeweb.com/tabel.html

The validator does not object to your paragraphs. However, it did note
that there is a missing closing brace for the style: #overzicht ol {
 
S

Samuel van Laere

Beauregard T. Shagnasty said:
I would say they are superfluous in your <td>s. They do, however, lead
to semantic markup as you are actually including paragraphs of text in
the table.

So in my case the use of paragraphs makes sence then.
Seems fine to me too.
The validator does not object to your paragraphs. However, it did note
that there is a missing closing brace for the style: #overzicht ol {

True the validator is happy with or without paragraphs.
Thanks for spotting the missing closing brace, its fixed now.

cheers,
Samuel van Laere
 
J

Jukka K. Korpela

Samuel said:
<tr>
<td><p>Achromaat</p></td>
<td><p>De persoon mist het kleuren zien ten gevolge van het
ontbreken van alle kegeltjes.</p></td>
</tr>

Are the paragraphs okay or are they not needed?

A single word hardly constitutes a paragraph. A paragraph is "a subdivision
of a written composition that consists of one or more sentences, deals with
one point or gives the words of one speaker, and begins on a new usually
indented line", to quote
http://www.merriam-webster.com/dictionary/paragraph

It might be argued that the defining text in the second cell is a paragraph,
but it's really just part of a sentence, implying the word being defined as
the subject and some predicate expression like "is" or "is defined as". I
think this even applies to those cases in your table where the second-column
cell contains complete sentences. They still don't constitute a _paragraph_,
i.e. a relatively self-contained passage of text - at least the term being
defined needs to be implied here.

Of course this is mostly just theoretical, since correct semantics of markup
has little impact on the practical properties of an HTML document. Still,
why should we use wrong markup when we can easily, and often easier, use
more proper markup?
Is there a reason to use/not use paragraphs within a <td>?

It's hard to see how it could do any good.

The default top and bottom margins of <p> elements might cause some
undesirable formatting. Oddly, you seem to have set them to zero, except for
top margin, causing some waste of space. Just omitting <p> markup is the
best approach. If you really want the extra spacing you have now, you can
easily create it using padding-top for said:
My table is to found here, just in case one needs to see the bigger
picture: http://oukjeweb.com/tabel.html

I have to contradict myself a bit. Sometimes in tables of definitions like
this*), the defining expression is so long and complicated that it should
maybe be divided into two or more paragraphs. For example, your definition
for "gezichtsscherpte" is fairly long and would probably benefit from a
division into paragraphs. But then a <td> would contain two or more <p>
elements whereas other cells in the same column would have just text
content.

I'd respond by asking "So what?" When you define terms, sometimes the
defining expression can be a single word (like a more common synonym),
sometimes a few words, or an almost complete sentence, or even more - maybe
several paragraphs. It could also be a list, or contain a list, or maybe an
image. There is no reason why such variation, when it exists (it might be
inferior presentation style, but that's debatable, and not really relevant
here), should not be reflected in the markup. If the cells contain really
different types of stuff, they can well contain different markup elements.

*) A table is good markup. Theoretically you could additionally use <dfn>
markup for the term being defined or alternatively use <dl> for the whole
stuff, but don't bother - such markup approaches have drawbacks and they
hardly achieve anything, in this world where web browsers and robots are
mostly semantically ignorant, despite all the idle babbling about "semantic
web". There is no really adequate markup for definitions, still less sets of
definitions, in HTML, and using a two-column table is quite OK.
 
S

Samuel van Laere

Jukka K. Korpela said:
A single word hardly constitutes a paragraph. A paragraph is "a
subdivision of a written composition that consists of one or more
sentences, deals with one point or gives the words of one speaker, and
begins on a new usually indented line", to quote
http://www.merriam-webster.com/dictionary/paragraph

--Snip lots of usefull text --

I'd exspected a reply of you Jukka, and its a extended one too, though thats
not very unusual with you. :)
You should make it a page on your website for others to learn from, or did I
just miss it?
While I might not agree with everyting you wrote, its still educational and
at the least its entertaining.
I'll remove those unneeded paragraphs, besides it also reduces the
filesize..

cheers,
Samuel (follower of Yucca)
 
J

Jenn

Ed said:
Beauregard T. Shagnasty wrote:


That was REALLY a nice reply!

I would have said something on the order of:

"Ok! Go study! Learn!" And lots of other "stuff."

Then come back and annoy us with silly questions you should have
already figured out on you own.

Geez. BSG! What happened to your slapping novices around?!!! Dang!

some people are simply more intelligent so they don't need to slap anyone
around....
 

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

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,476
Members
44,896
Latest member
PenniGowin

Latest Threads

Top