Tableless web design
Tableless web design is a web design method that avoids the use of HTML tables, for page layout control purposes. Instead of HTML tables, style sheet languages such as Cascading Style Sheets are used to arrange elements and text on a web page.
History
HTML is a markup language whose visual presentation was initially left up to the user. However, as the Internet expanded from the academic and research world into the mainstream in the mid-1990s, and became more media oriented, graphic designers sought ways to control the visual appearance of their Web pages. As popularised especially by the designer David Siegel in his book Creating Killer Web sites, tables and spacers were used to create and maintain page layouts.In the late 1990s the first reasonably powerful WYSIWYG editors arrived on the market, which meant Web designers no longer needed a technical understanding of HTML to build web pages. Such editors indirectly encouraged extensive use of nested tables to position design elements. As designers edited their documents in these editors, unnecessary code and empty elements were added to the document. Furthermore, unskilled designers were likely to use tables more than required when using a WYSIWYG editor. This practice frequently led to many tables nested within tables, as well as tables with unnecessary rows and columns. The use of graphic editors with slicing tools that output HTML and images directly also promoted poor code with tables often having many rows of 1 pixel height or width. Sometimes many more lines of code were used to render content than the actual content itself.
The reliance on tables for layout purposes caused a number of problems. Many web pages were designed with tables nested within tables, resulting in large HTML documents that use more bandwidth than documents with simpler formatting. Furthermore, when a table-based layout is linearized, for example when being parsed by a screen reader or a search engine, the resulting order of the content can be somewhat jumbled and confusing.
Cascading Style Sheets were developed to improve the separation between design and content, and move back towards a semantic organization of content on the Web. The term "tableless design” implies the use of CSS rather than layout tables to position HTML elements on the page. HTML tables still have their legitimate place when presenting tabular information within web pages, and are also sometimes still used as layout devices in situations for which CSS support is poor or problematical, like vertically centering an element. Another area where tables are still used is e mailers, and the reason is because many popular Email clients haven't really kept up on the modem HTML and CSS rendering. In such a scenario, complex e mailers lose some of their structural and creative alignment.
Adoption
The CSS1 specification was published in December 1996 by the W3C with the aim of improving web accessibility and emphasising the separation of presentational details in style sheets from semantic content in HTML documents. CSS2 in May 1998 extended CSS1 with facilities for positioning and table layout.The preference for using HTML tables rather than CSS to control the layout of whole web pages was due to several reasons:
- the desire of content publishers to replicate their existing corporate design elements on their web site;
- the limitations at the time of CSS support in browsers;
- the installed base of browsers that did not support CSS;
- the new web designers' lack of familiarity with the CSS standards;
- the lack of knowledge of, or concern for the reasons to use CSS instead of what was perceived as an easier way to quickly achieve the intended layouts, and
- a new breed of WYSIWYG web design tools that encouraged this practice.
Rationale
The intended and semantic purpose of HTML tables lies in presenting tabular data rather than laying out pages.The benefits of using CSS for page layout include improved accessibility of the information to a wider variety of users, using a wide variety of user agents. There are bandwidth savings as large numbers of semantically meaningless, and tags are removed from dozens of pages leaving fewer, but more meaningful headings, paragraphs and lists. Layout instructions are transferred into site-wide CSS stylesheets, which can be downloaded once and cached for reuse while each visitor navigates the site. Sites may become more maintainable as the whole site can be restyled or re-branded in a single pass merely by altering the mark-up of the specific CSS, affecting every page which relies on that stylesheet. New HTML content can be added in such a way that consistent layout rules are immediately applied to it by the existing CSS without any further effort.
Advantages
Accessibility
Because of the Internet's rapid growth, expanding disability discrimination legislation, and the increasing use of mobile phones and PDAs, it is necessary for Web content to be made accessible to users operating a wide variety of devices beyond the relatively uniform desktop computer and CRT monitor ecosystem the web first became popular on. Tableless Web design considerably improves Web accessibility in this respect.Screen readers and braille devices have fewer problems with tableless designs because they follow a logical structure. The same is true for search engine Web crawlers, the software agents that most web site publishers hope will find their pages, classify them accurately and so enable potential users to find them easily in appropriate searches.
As a result of the separation of design and structure, it is also possible to provide different layouts for different devices, e.g. handhelds, mobile phones, etc. It is also possible to specify a different style sheet for print, e.g. to hide or modify the appearance of advertisements or navigation elements that are irrelevant and a nuisance in the printable version of the page.
The W3C's Web Content Accessibility Guidelines' guideline no. 3 states "use markup and style sheets and do so properly."
The guideline's checkpoint 3.3, a priority-2 checkpoint, says "use style sheets to control layout and presentation."
Bandwidth savings
Tableless design produces web pages with fewer HTML tags used purely to position content. This normally means that the pages themselves become smaller to download. The philosophy implies that all the instructions regarding layout and positioning be moved into external style sheets. According to the basic capabilities of HTTP, as these rarely change and they apply in common to many web pages, they will be cached and reused after the first download. This further reduces bandwidth and download times across the site.Maintainability
Maintaining a website may require frequent changes, both small and large, to the visual style of a website, depending on the purpose of the site. Under table-based layout, the layout is part of the HTML itself. As such, without the aid of template-based visual editors such as HTML editors, changing the positional layout of elements on a whole site may require a great deal of effort, depending on the amount of repetitive changes required. Even employing sed or similar global find-and-replace utilities cannot alleviate the problem entirely.In tableless layout using CSS, the layout information may reside in a CSS document. Because the layout information may be centralized, it is possible that these changes can be made quickly and globally by default. The HTML files themselves may not need to be adjusted when making layout changes.
Also, because the layout information may be stored externally to the HTML, it may be quite easy to add new content in a tableless design, whether modifying an existing page or adding a new page. By contrast, without such a design, the layout for each page may require a more time-consuming manual changing of each instance or use of global find-and-replace utilities. However site owners often want particular pages to be different from others on the site either for a short period or long term. This will often necessitate a separate style sheet to be developed for that page. The page content usually can remain unaltered however, which is not the case in a tables-based design.