Table rows and paragraphs

Discussion in 'HTML' started by Samuel van Laere, Jun 10, 2010.

  1. 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
    Samuel van Laere, Jun 10, 2010
    #1
    1. Advertising

  2. Samuel van Laere wrote:

    > 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 {

    --
    -bts
    -Four wheels carry the body; two wheels move the soul
    Beauregard T. Shagnasty, Jun 10, 2010
    #2
    1. Advertising

  3. "Beauregard T. Shagnasty" <> schreef in bericht
    news:huri2v$qul$-september.org...
    >
    > 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.

    >> 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 {
    >


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

    cheers,
    Samuel van Laere
    Samuel van Laere, Jun 10, 2010
    #3
  4. Samuel van Laere wrote:

    > <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 <td>.

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

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Jun 10, 2010
    #4
  5. "Jukka K. Korpela" <> schreef in bericht
    news:u7cQn.18122$...
    > Samuel van Laere wrote:
    >
    >> <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
    >


    --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)
    Samuel van Laere, Jun 11, 2010
    #5
  6. Samuel van Laere

    Jenn Guest

    Ed Mullen wrote:
    > Beauregard T. Shagnasty wrote:



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

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

    --
    Jenn (from Oklahoma)
    Jenn, Jun 12, 2010
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Subba Rao via DotNetMonster.com

    script for moving rows up and down and traverse thru rows of HTML table

    Subba Rao via DotNetMonster.com, Mar 19, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    8,196
    Subba Rao via DotNetMonster.com
    Mar 19, 2005
  2. jersie0
    Replies:
    0
    Views:
    672
    jersie0
    Nov 23, 2003
  3. Rio
    Replies:
    4
    Views:
    1,172
  4. kylin
    Replies:
    1
    Views:
    526
    Chris Rebert
    Nov 4, 2009
  5. Max Norman
    Replies:
    6
    Views:
    176
    Max Norman
    Jul 22, 2009
Loading...

Share This Page