Fixit – Tables for layout

This test attempts to determines if your page is using tables for layout purposes. Tables should be used to present tabular data, rather than to control the layout of a page. The problems associated with using tables for layout are well documented. In particular, they generally require more markup and take longer to render than acheiving the same with CSS. In addition, most devices cannot display nested tables correctly either. (Ready.mobi also checks for nested tables)

 

Checking if tables are used for layout

To pass this test your page should follow the following guidelines:

  • Each table element should contain more than one tr element
  • There should be at least one tr element that contains at least two td elements
  • No nested td element should contain ONLY an image or object whose dimensions are 2×2 or less.

 

Reference

This test is based on a W3C mobileOK best practice. See http://www.w3.org/TR/mobile-bp/#TABLES_LAYOUT for more details.

See also the Nested tables and the Tables tests.

Exclusive tips, how-tos, news and comment

Receive monthly updates on the world of mobile dev.

Other Products

Market leading device intelligence for the web, app and MNO ecosystems
DeviceAtlas - Device Intelligence

Real-time identification of fraudulent and misrepresented traffic
DeviceAssure - Device Verification

A free tool for developers, designers and marketers to test website performance
mobiReady - Evaluate your websites’ mobile readiness

© 2024 DeviceAtlas Limited. All rights reserved.

This is a website of DeviceAtlas Limited, a private company limited by shares, incorporated and registered in the Republic of Ireland with registered number 398040 and registered office at 6th Floor, 2 Grand Canal Square, Dublin 2, Ireland