Left Justified

Feeds

Quoting Tables; a Question of Semantics

| January 7, 2005 | Category: Web Nerdery

Real world scenario: A penguin walks into a bar… Hang on, wrong meeting.
Ok, here’s the deal: Consider the following HTML snippets, each containing a table of data that has been quoted from an earlier publication. The only difference is how the source is referenced. Is there one that stands above the others? Why?

These samples are structurally complete, but totally stripped to retain focus on the placement of the citation.

Example 1

  1. <table summary="">
  2. <caption></caption>
  3. <thead>
  4. <tr>
  5. <th scope="col"></th>
  6. <th scope="col"></th>
  7. <th scope="col"></th>
  8. </tr>
  9. </thead>
  10. <tfoot>
  11. <tr>
  12. <td colspan="3">Published by <cite>......</cite></td>
  13. </tr>
  14. </tfoot>
  15. <tbody>
  16. <tr>
  17. <td></td>
  18. <td></td>
  19. <td></td>
  20. </tr>
  21. </tbody>
  22. </table>

Example 2

  1. <blockquote>
  2. <table summary="">
  3. <caption></caption>
  4. <thead>
  5. <tr>
  6. <th scope="col"></th>
  7. <th scope="col"></th>
  8. <th scope="col"></th>
  9. </tr>
  10. </thead>
  11. <tbody>
  12. <tr>
  13. <td></td>
  14. <td></td>
  15. <td></td>
  16. </tr>
  17. </tbody>
  18. </table>
  19. <p>Published by <cite>......</cite></p>
  20. </blockquote>

Example 3

  1. <blockquote cite="Published by ......">
  2. <table summary="">
  3. <caption></caption>
  4. <thead>
  5. <tr>
  6. <th scope="col"></th>
  7. <th scope="col"></th>
  8. <th scope="col"></th>
  9. </tr>
  10. </thead>
  11. <tbody>
  12. <tr>
  13. <td></td>
  14. <td></td>
  15. <td></td>
  16. </tr>
  17. </tbody>
  18. </table>
  19. </blockquote>

I’ve decided which one I prefer, but I’d like to hear others’ views about this. I almost forgot to mention — one example may be completely wrong.

Many will see the obvious similarities between this post and Dan Cederholm’s “SimpleQuiz” series, however I have no intention of doing this sort of survey again so please flame/troll elsewhere. Thankyou and have a great day :-)


  1. 1
    Rob Mientjes said:

    I like the third one with the cite attribute as it is less obtrusive but still contains relevant data. But I’m in dubio.

    What about that penguin?

    Comment posted on:
    1:00 am, 7th of Jan 2005
  2. 2
    John Oxton said:

    Hmmm…. difficult, but I think for neatness I would probably say Example 3 looks the most elegant and logical.

    Comment posted on:
    1:12 am, 7th of Jan 2005
  3. 3
    Scott Plumlee said:

    Gotta go with #3. Makes it obvious that you are persenting data from another source before the data is encountered, whereas the other two present the data and then cite it. From the standpoint of a reader, I’d rather know where it comes from right away so I can keep that in mide while looking at the information.

    Comment posted on:
    1:23 am, 7th of Jan 2005
  4. 4
    mark said:

    As long as you quote the whole table, there seems to be no reason to go with 1. I would like to go with John and Scott but your use of the cite-attribute seems wrong considering the discussion at Roger’s. cite as an attribute has to contain a URI. In 2 your blockquote contains content that is not part of the quote.
    I would mix 2+3 to take a blockquote containing the cite="URI” and a paragraph following the blockquote containing the reference to the original author. if you want to enclose that in one tag I think you have to go with a <div class="quote">.

    just my 2 C.

    Comment posted on:
    3:32 am, 7th of Jan 2005
  5. 5
    Paul Connolley said:

    I feel mark is on the right track, IMO, and have similar feeling about the combination of 2 and 3.
    The cite attribute is for URIs and, in the context of the blockquote element should be to cite the source document and not really for short messages.
    I would recommend the use of the title attribute to add extra information. I believe there are a number of people using this method.
    I refer you to the following links:

    Photo Matt: A cite to see
    A post by Dan Connolly on the w3 lists

    Comment posted on:
    3:55 am, 7th of Jan 2005
  6. 6
    Geoffrey Sneddon said:

    I’d say 2, as the cite attribute is for URIs, and it also put’s it outside the table, which IMO it has no reason to be in…

    Comment posted on:
    4:13 am, 7th of Jan 2005
  7. 7
    Andrew said:

    I knew number three would be tempting – looks like it caught three people before being exposed ;-). Number three does make more sense though, and since a physical publication (esp. one which is out of print) can’t be expected to have a URI, surely some leverage is needed.

    Paul: thanks for the photomatt link – I missed that one first time ’round

    Rob: The penguin was delicious!

    Comment posted on:
    9:54 am, 7th of Jan 2005
  8. 8
    heretic said:

    Hmm. I’d go for option two, but only since option three relies on the cite attribute which is for a URI rather than conversational text. As a result, the plain text paragraph wins out in my mind.

    Plus… personally I am wary of quoting something and not being clear enough about what is a quote and what is my own content. Since I’m not sure the average user knows about semantics, I wouldn’t feel comfortable relying on an attribute to make the soure clear.

    Comment posted on:
    10:28 am, 7th of Jan 2005
  9. 9
    Seth Thomas Rasmussen said:

    My favorite number: #2!

    You left a comment using the cite attribute in the manner of #3 on my site not too long ago, I recall. ;) I’m pretty sure I’ve done the same thing at least at one point or another.

    These are good details to cover, so I’m glad you can be arsed to use your blog-space for it.

    When you use the cite attribute properly, it fascilitates some useful functionality. On my site, for instance, I use a function that reads the attribute, and if it has a value, automatically appends a link to the source within’ the quote.

    I want to publish the function for others, but I’ve yet to iron out the details with auto-linking <q /> elements. The same function handles both.

    Comment posted on:
    1:30 am, 8th of Jan 2005
  10. 10
    Gabriel Mihalache said:

    No idea, but I just wanted to say that I really love your obsession with the semantics of it all… you managed the record of raising an issue with completly non-rendered information! Wow!
    This is the kind of attitude that will push XHTML2.0 and the semnatic web forward. Keep up the good/obsessive work!

    Comment posted on:
    8:51 am, 21st of Jan 2005
  11. 11
    Glen Mailer said:

    Hate to be picky, but might I point out that of the three, only the first is actually valid. Unless I’m mistaken you must either use thead, tfoot and tbody, or none of the three at all.

    Comment posted on:
    7:32 am, 14th of Mar 2005
  12. 12
    Rasmus Kaj said:

    (Ok, your issue is rather old, but I throw in my €0.02 anyway).

    I would put the cite in the caption of the table. Unfortunatley, the caption is inline content, and there can only be one caption, but I think I just would do:

    <caption>
      <span class="orig-caption">The original caption.</span>
      <span class="site-caption">Published by <cite> … </cite>.&lt/span>
    </caption>

    Comment posted on:
    7:46 pm, 9th of Aug 2006

Have Your Say

Sorry, comments are closed on this post.