{"id":716,"date":"2011-02-07T05:42:15","date_gmt":"2011-02-07T05:42:15","guid":{"rendered":"http:\/\/awgentry.com\/?p=716"},"modified":"2011-02-07T05:42:15","modified_gmt":"2011-02-07T05:42:15","slug":"webpage-layouts-tables-vs-css","status":"publish","type":"post","link":"http:\/\/awgentry.com\/weblog\/webpage-layouts-tables-vs-css\/","title":{"rendered":"Webpage Layouts: Tables vs CSS"},"content":{"rendered":"<p>Just like a newspaper would be tough to read through  if each article were on its own page and thrown in a pile, users  struggle with webpages which lack a <a class=\"zem_slink\" title=\"Page layout\" rel=\"wikipedia\" href=\"http:\/\/en.wikipedia.org\/wiki\/Page_layout\">layout<\/a> design. Laying out your pages properly can help with the visual organization of a webpage and let  people find what they want quickly and easily.<\/p>\n<div class=\"zemanta-img zemanta-action-dragged\">\n<div style=\"width: 153px\" class=\"wp-caption alignright\"><a href=\"http:\/\/commons.wikipedia.org\/wiki\/File:Jigsaw.svg\"><img loading=\"lazy\" decoding=\"async\" title=\"a drawing of a 4 piece jigsaw puzzle\" src=\"http:\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/7\/75\/Jigsaw.svg\/300px-Jigsaw.svg.png\" alt=\"a drawing of a 4 piece jigsaw puzzle\" width=\"147\" height=\"132\" \/><\/a><p class=\"wp-caption-text\">Image via Wikipedia<\/p><\/div>\n<\/div>\n<p>You may have heard of both tables and <a title=\"Cascading Style Sheets\" rel=\"wikipedia\" href=\"http:\/\/en.wikipedia.org\/wiki\/Cascading_Style_Sheets\">cascading stylesheets<\/a> being used as layout tools for websites &#8212; that is, placing website elements like jigsaw puzzle pieces on the page in order to set everything in its proper place. While either is a possible option, there&#8217;s good evidence to show that tables are now obsolete for this purpose.<\/p>\n<p>The original purpose of the <a href=\"http:\/\/en.wikipedia.org\/wiki\/HTML_element#Tables\">TABLE<\/a> tag and related <a class=\"zem_slink\" title=\"HTML element\" rel=\"wikipedia\" href=\"http:\/\/en.wikipedia.org\/wiki\/HTML_element\">tags<\/a> was to build charts containing columns and rows of data. <a class=\"zem_slink\" title=\"Web design\" rel=\"wikipedia\" href=\"http:\/\/en.wikipedia.org\/wiki\/Web_design\">Web designers<\/a><span class=\"zem_slink\"> <\/span>later expanded their use to include laying out pages in a grid structure.<\/p>\n<p>This worked decently well, but it caused <a href=\"http:\/\/en.wikipedia.org\/wiki\/Accessibility#Telecommunications_and_IT_access\">accessibility<\/a> issues and used complicated and hard-to-maintain code, especially when several tables had to be nested within each other.<\/p>\n<p>With the advent of positioning by <a class=\"zem_slink\" title=\"Span and div\" rel=\"wikipedia\" href=\"http:\/\/en.wikipedia.org\/wiki\/Span_and_div\">DIV tags<\/a> and other positional cascading stylesheets, the table concept as a layout tool has <a href=\"http:\/\/en.wikipedia.org\/wiki\/Tableless_web_design\">become obsolete<\/a>. CSS allows designers to create layouts which are flexible by media (screen, print, handheld&#8230;), work better with search engines and alternative browsers such as <a class=\"zem_slink\" title=\"Screen reader\" rel=\"wikipedia\" href=\"http:\/\/en.wikipedia.org\/wiki\/Screen_reader\">screen readers<\/a>, and usually take less code to make the same layout.<\/p>\n<h6 class=\"zemanta-related-title\">Related articles<\/h6>\n<ul class=\"zemanta-article-ul\">\n<li class=\"zemanta-article-ul-li\"><a href=\"http:\/\/tc.eserver.org\/37690.html\">CSS Positioning 101<\/a> (tc.eserver.org)<\/li>\n<li class=\"zemanta-article-ul-li\"><a href=\"http:\/\/www.onextrapixel.com\/2011\/02\/04\/the-rising-importance-of-flexible-web-layouts\/\">The Rising Importance of Flexible Web Layouts<\/a> (onextrapixel.com)<\/li>\n<\/ul>\n<div class=\"zemanta-pixie\"><img decoding=\"async\" class=\"zemanta-pixie-img\" src=\"http:\/\/img.zemanta.com\/pixy.gif?x-id=eff4e0b6-334c-495c-8395-aa14a1a1d100\" alt=\"\" \/><span class=\"zem-script more-related pretty-attribution\"><script src=\"http:\/\/static.zemanta.com\/readside\/loader.js\" type=\"text\/javascript\"><\/script><\/span><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Just like a newspaper would be tough to read through if each article were on its own page and thrown in a pile, users struggle with webpages which lack a layout design. Laying out your pages properly can help with the visual organization of a webpage and let people find what they want quickly and&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,133],"tags":[146,147,66,148,137],"class_list":["post-716","post","type-post","status-publish","format-standard","hentry","category-creative","category-programming-web","tag-cascading-style-sheets","tag-css","tag-page-layout","tag-span-and-div","tag-web-design"],"_links":{"self":[{"href":"http:\/\/awgentry.com\/weblog\/wp-json\/wp\/v2\/posts\/716","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/awgentry.com\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/awgentry.com\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/awgentry.com\/weblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/awgentry.com\/weblog\/wp-json\/wp\/v2\/comments?post=716"}],"version-history":[{"count":0,"href":"http:\/\/awgentry.com\/weblog\/wp-json\/wp\/v2\/posts\/716\/revisions"}],"wp:attachment":[{"href":"http:\/\/awgentry.com\/weblog\/wp-json\/wp\/v2\/media?parent=716"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/awgentry.com\/weblog\/wp-json\/wp\/v2\/categories?post=716"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/awgentry.com\/weblog\/wp-json\/wp\/v2\/tags?post=716"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}