{"id":254,"date":"2011-06-07T13:37:23","date_gmt":"2011-06-07T13:37:23","guid":{"rendered":"http:\/\/www.sitekickr.com\/blog\/?p=254"},"modified":"2011-06-07T13:37:23","modified_gmt":"2011-06-07T13:37:23","slug":"html-dl-vs-tables","status":"publish","type":"post","link":"https:\/\/www.sitekickr.com\/blog\/html-dl-vs-tables\/","title":{"rendered":"Use DLs instead of tables for key \/ value lists"},"content":{"rendered":"<p>If you&#39;re looking to display a simple key\/value list, such as a list of user&#39;s contact information, a table might be overkill. I&#39;d suggest the use of the <a href=\"http:\/\/www.w3schools.com\/tags\/tag_dl.asp\">definition list<\/a>. In my opinion, the syntax for this element is far simpler &#8211; leading to more manageable code. It&#39;s only downfall is how it&#39;s rendered on the page (value below key).<\/p>\n<p>To make <em><strong>DL <\/strong><\/em>behave more like a table with columns, use the following CSS as a guide:<\/p>\n<p><code>dt { float: left; clear: left; width: 100px; margin: 5px 10px 0 0; }<br \/>\n\tdd { float: left; margin: 5px 0 0 0; }<br \/>\n\t<\/code><\/p>\n<p>You may want to adjust the width of the dt if you expect larger amounts of text.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#39;re looking to display a simple key\/value list, such as a list of user&#39;s contact information, a table might be overkill. I&#39;d suggest the&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"amp_status":""},"categories":[12,14],"tags":[90],"_links":{"self":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/254"}],"collection":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/comments?post=254"}],"version-history":[{"count":1,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/254\/revisions"}],"predecessor-version":[{"id":255,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/254\/revisions\/255"}],"wp:attachment":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/media?parent=254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/categories?post=254"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/tags?post=254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}