What Would Tantek Do?

Posted Thursday 16th February, 2006

A common problem, faced every day by web developers, is that of semantic markup. Having gone through the table-based disregard for HTML that was the mid 90s, we’ve come out the other side with stronger resolve. We now have the tools to seperate design from content (see Malarkey’s Web Standards Trifle); allowing us to concentrate on marking up the content with more meaning. This has, in turn, resulted in most of us going back to school to re-learn HTML so we can improve our understanding of the tags available to us.

To this end, Stuart and I regularly have discussions relating to the “best” methods of semantically marking up particular types of data. This, inevitably, degrades into idea-tennis™ and a mammoth, googled research session (to see what everybody else does). Ultimately, we ask that most familiar of developer’s questions: What would Tantek do?

Currently our discussions have been about two things; dates and comment rolls. So what are the best ways of marking these two items up?

Dates are a genuine nightmare (multiformats aside). As a developer, I want it to be obvious that the data I have marked up is a date; but there’s no tag available to do this. This is probably the only data type I can think of (without the prompting of the inevitable comments to follow) where this is the case.

Comment rolls, on the other hand, are a different kettle of fish. Obviously a comment roll should be some form of list; and 9 times out of 10 I prefer an ordered list (<ol>—it’s nice to know the order of the comments). However, how do I mark up the content of each list item? I’m inevitably going to want to include the comment text, but I also want to include a citation; and the date and time it was posted. Looking around the web it’s clear that a lot of developers (including Doug Bowman, Faruk AteÅŸ and Stuart) feel this is the perfect place for a definition list (<dl>)—citation and date as the definition term and comment text as the definition description. This makes sense to me but doesn’t allow the ordered nature of the <ol> (we’re talking sans-stylesheet here). The best way to get the best of both worlds (in my humble opinion) is to nest the <dl> within the <ol>. This results in something like the following:

        January 18, 2006 @ 9:53 pm
        <p>That would make a great T-shirt!</p>

In summary, I guess problems like this are always going to be open to interpretation. So let me finish this post with two simple questions: Has this sort of thing ever happened to you, and what did you do to solve it?

Answers on a comment roll to…

Included in: Development, Web Standards, XHTML


  1. Accessibility
  2. Agile
  3. Ajax
  4. Apache
  5. API
  6. Architecture
  7. Books
  8. Browsers
  9. CMS
  10. CouchDB
  11. CSS
  12. Design
  13. Development
  14. Django
  15. Email
  16. Events
  17. Gaming
  18. Grammar
  19. Hardware
  20. HTML
  21. HTTP
  22. Humour
  23. Idea
  24. Information Architecture
  25. JavaScript
  26. jQuery
  27. Lean
  28. Life
  29. Linux
  30. Literature
  31. Mac OS X
  32. Management
  33. Meme
  34. Microformats
  35. Monday
  36. MySQL
  37. Networking
  38. News
  39. Personal
  40. Photoshop
  41. PHP
  42. Process
  43. Python
  44. Reference
  45. REST
  46. Science
  47. SEO
  48. Server
  49. Site
  50. Sitepimp
  51. Social
  52. Spelling
  53. Syndication
  54. Testing
  55. The Future
  56. Thoughts
  57. Tools
  58. Tutorial
  59. Tutorials
  60. Typography
  61. UI
  62. UNIX
  63. Virtualisation
  64. Web
  65. Web Standards
  66. Widgets
  67. Wii
  68. Writing
  69. Xbox
  70. XHTML