{"id":924,"date":"2009-06-05T08:00:16","date_gmt":"2009-06-05T07:00:16","guid":{"rendered":"http:\/\/www.maratz.com\/blog\/?p=924"},"modified":"2010-04-12T02:00:11","modified_gmt":"2010-04-12T01:00:11","slug":"definition-list-for-article-comments-or-im-dialogue","status":"publish","type":"post","link":"http:\/\/www.maratz.com\/blog\/archives\/2009\/06\/05\/definition-list-for-article-comments-or-im-dialogue\/","title":{"rendered":"Definition list for article comments or IM dialogue"},"content":{"rendered":"<p>HTML5 is <em>the<\/em> buzzword this season. Leading people in the industry are using appropriate class names for what will hopefully once become fully supported structural elements. Fully supported = fully supported by browsers.<\/p>\n<p>In getting ready for HTML5 instead of element <code>header<\/code>:<\/p>\n<pre><code>&#60;header&#62;Site Name&#60;\/header&#62;<\/code><\/pre>\n<p>you\u2019d write<\/p>\n<pre><code>&#60;div class=\"header\"&#62;Site Name&#60;\/div&#62;<\/code><\/pre>\n<p>For the inclined readers, here\u2019s the <a href=\"http:\/\/www.w3.org\/html\/wg\/markup-spec\/\">HTML5 working draft<\/a>. Quick overview of the element list will help you catch the train.<\/p>\n<h2>Definition lists, rediscovered<\/h2>\n<p>Definition list is a personal favorite HTML pattern for marking-up 2 or more related content elements. I found it especially useful when nested in list-items on search results pages and various tag\/category listings. This raised a lots of controversy in the past and is still raising today, but I won\u2019t go down that route now. Here\u2019s just a quick example, just in case you don\u2019t have a clue what I\u2019m talking about: <!--more--><\/p>\n<p><code><\/p>\n<pre>&#60;ul&#62;\r\n    &#60;li&#62;&#60;dl&#62;\r\n        &#60;dt&#62;Title&#60;\/dt&#62;\r\n        &#60;dd class=\"thumbnail\"&#62;&#60;img src=\"image.jpg\" alt=\"\" \/&#62;&#60;\/dd&#62;\r\n        &#60;dd class=\"abstract\"&#62;Lorem ipsum dolor sit amet...&#60;\/dd&#62;\r\n    &#60;\/dl&#62;&#60;\/li&#62;\r\n&#60;\/ul&#62;<\/pre>\n<p><\/code><\/p>\n<p>The all new rediscovered <a href=\"http:\/\/www.w3.org\/TR\/html5\/semantics.html#the-dialog-element\">use of definition lists is with comments or dialogs<\/a>, for instance Twitter conversation. It has always been it\u2019s intended for this, but now with the dawn of HTML5 (or launch-break for many) it regains the popularity.<\/p>\n<p><cite><a href=\"http:\/\/www.w3.org\/TR\/html4\/struct\/lists.html#h-10.3\">HTML4 specs<\/a> say:<\/cite><\/p>\n<blockquote><p>Another application of <code>DL<\/code>, for example, is for marking up dialogues, with each <code>DT<\/code> naming a speaker, and each <code>DD<\/code> containing his or her words.<\/p><\/blockquote>\n<p>And here it is:<\/p>\n<p><code><\/p>\n<pre>&#60;dl class=\"dialog\">\r\n    &#60;dt>\r\n        &#60;a href=\"http:\/\/twitter.com\/designer\">\r\n            &#60;img src=\"designer.jpg\" alt=\"\" \/> @designer\r\n        &#60;\/a>\r\n    &#60;\/dt>\r\n    &#60;dd>Oh, it looks beautiful with shortcuts.&#60;\/dd>\r\n    \r\n    &#60;dt>\r\n        &#60;a href=\"http:\/\/twitter.com\/projectmanager\">\r\n            &#60;img src=\"projectmanager.jpg\" alt=\"\" \/> @projectmanager\r\n        &#60;\/a>\r\n    &#60;\/dt>\r\n    &#60;dd>What? But we have full sentences over there!&#60;\/dd>  \r\n    \r\n    &#60;dt>\r\n        &#60;a href=\"http:\/\/twitter.com\/designer\">\r\n            &#60;img src=\"designer.jpg\" alt=\"\" \/> @designer\r\n        &#60;\/a>\r\n    &#60;\/dt>\r\n    &#60;dd>Huh?... but it breaks my grid?!\r\n        F*ckin user generated content.&#60;\/dd>\r\n    \r\n    &#60;dt>\r\n        &#60;a href=\"http:\/\/twitter.com\/projectmanager\">\r\n            &#60;img src=\"projectmanager.jpg\" alt=\"\" \/> @projectmanager\r\n        &#60;\/a>\r\n    &#60;\/dt>\r\n    &#60;dd>Another solution is: we don\u2019t let users post anything.&#60;\/dd>\r\n    \r\n    &#60;dt>\r\n        &#60;a href=\"http:\/\/twitter.com\/designer\">\r\n            &#60;img src=\"designer.jpg\" alt=\"\" \/> @designer\r\n        &#60;\/a>\r\n    &#60;\/dt>\r\n    &#60;dd>No, we can\u2019t do that neither.\r\n        How about we ask\r\n            &#60;a href=\"http:\/\/twitter.com\/programmer\">@programmer&#60;\/a>\r\n            to shorten strings?&#60;\/dd>\r\n    \r\n    &#60;dt>\r\n        &#60;a href=\"http:\/\/twitter.com\/projectmanager\">\r\n            &#60;img src=\"projectmanager.jpg\" alt=\"\" \/> @projectmanager\r\n        &#60;\/a>\r\n    &#60;\/dt>\r\n    &#60;dd>Clever idea! Go ask him!&#60;\/dd>\r\n    \r\n    &#60;dt>\r\n        &#60;a href=\"http:\/\/twitter.com\/designer\">\r\n            &#60;img src=\"designer.jpg\" alt=\"\" \/> @designer\r\n        &#60;\/a>\r\n    &#60;\/dt>\r\n    &#60;dd>I came with the idea, &#60;em>you&#60;\/em> ask him!&#60;\/dd>\r\n    \r\n    &#60;dt>\r\n        &#60;a href=\"http:\/\/twitter.com\/projectmanager\">\r\n            &#60;img src=\"projectmanager.jpg\" alt=\"\" \/> @projectmanager\r\n        &#60;\/a>\r\n    &#60;\/dt>\r\n    &#60;dd>On second thought, I\u2019ll tell\r\n        &#60;a href=\"http:\/\/twitter.com\/cssdeveloper\">@cssdeveloper&#60;\/a>\r\n        to think of something.&#60;\/dd>\r\n    \r\n    &#60;dt>\r\n        &#60;a href=\"http:\/\/twitter.com\/designer\">\r\n            &#60;img src=\"designer.jpg\" alt=\"\" \/> @designer\r\n        &#60;\/a>\r\n    &#60;\/dt>\r\n    &#60;dd>See? Problem solved!&#60;\/dd>\r\n&#60;\/dl><\/pre>\n<p><\/code><\/p>\n<p>Is this making any sense? Or should we just stick with ordered\/unordered lists and <code>cite<\/code> + <code>blockquote<\/code> pairs?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>HTML5 is the buzzword this season. Leading people in the industry are using appropriate class names for what will hopefully once become fully supported structural elements. Fully supported = fully supported by browsers. In getting ready for HTML5 instead of element header: &#60;header&#62;Site Name&#60;\/header&#62; you\u2019d write &#60;div class=&#8221;header&#8221;&#62;Site Name&#60;\/div&#62; For the inclined readers, here\u2019s the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3,17],"tags":[],"_links":{"self":[{"href":"http:\/\/www.maratz.com\/blog\/wp-json\/wp\/v2\/posts\/924"}],"collection":[{"href":"http:\/\/www.maratz.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.maratz.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.maratz.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.maratz.com\/blog\/wp-json\/wp\/v2\/comments?post=924"}],"version-history":[{"count":0,"href":"http:\/\/www.maratz.com\/blog\/wp-json\/wp\/v2\/posts\/924\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.maratz.com\/blog\/wp-json\/wp\/v2\/media?parent=924"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.maratz.com\/blog\/wp-json\/wp\/v2\/categories?post=924"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.maratz.com\/blog\/wp-json\/wp\/v2\/tags?post=924"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}