Search
Enter at least two characters without personal information.

    LibraryArticles & FAQ Your projectRequest a quote
    LanguageEN
    Practical guides

    Publish readable and accessible data tables

    A table connects values to rows and columns to compare offers, measures or characteristics. Data quality matters as much as markup: readers need to understand each value and the limits of comparison.

    Go to the method

    Tablet and printed tables on a table
    AI-generated illustration

    Define units, scope and missing values

    Use a title that identifies the subject, period and scope where relevant. Put units in headers or beside values. For prices, explain inclusions and comparison terms. Give missing values an explicit meaning instead of using zero, which could be mistaken for a measurement.

    Compare like with like. Monthly and yearly values need explained conversion or separate columns. Mark quote-only offers accordingly. Sorting should not imply a precise ranking of values that represent different things.

    Connect cells and their headers

    The W3C table tutorials describe a data structure with header cells. The simple-header example uses row or column relationships to make values meaningful. Reduce complex groupings when a simpler structure is enough.

    A reading table can contain links and buttons without becoming a full application grid. Cell selection or editing adds behavioural requirements. Do not adopt a grid model solely to colour a row or provide a sort button.

    Separate a table’s title from an explanation of its structure. caption helps identify the table; an additional description can explain unusual groupings without repeating its title. For a simple structure, scope associates headers with rows or columns. A cell merged using colspan or rowspan does not by itself make every relationship explicit.

    When multiple header levels cannot be described simply, headers references can identify the id values of the relevant header cells. Check that each identifier exists, remains unique and matches the cell being read. If the arrangement is difficult to explain, several simple tables may serve readers better. Visual formatting and row groups do not replace these associations in the final HTML.

    Scroll the table horizontally to read every column. With a keyboard, focus the table area and use the arrow keys.

    Table structure: choose the appropriate mechanism
    MechanismUseful roleCheck to perform
    captionIdentify the table’s subject.An understandable title distinct from the structure explanation.
    scope on a simple headerAssociate a header with its row or column.The relationship matches data meaning, not just visual position.
    colspan or rowspanExtend a cell across multiple positions.Do not confuse visual span with complete header associations.
    headers and idExplicitly associate a cell with its headers in a complex case.Existing references and unique identifiers, then check the published table.

    Plan sorting, mobile display and export

    Identify the active sort column and direction. Test numbers, dates and missing values: text sorting may place 100 before 20. Retain row context after actions and explain whether export includes only the current page.

    On mobile, compare a clearly indicated local scroll area with cards retaining field labels. Avoid shrinking all text until it becomes hard to read. Data requiring two-dimensional layout has a specific exception under the reflow criterion; surrounding content still needs to remain readable.

    Example: compare hosting offers

    Educational example: a table shows storage, backup, price and restoration terms. An unpublished price says “On quotation”. Price is sorted only when period and scope are comparable. Export retains units and qualifications; testing confirms that an absent value does not become zero.

    Compare cells with the same meaning

    A price column needs currency, tax basis and period. Distinguish zero, unavailable and not applicable rather than using the same dash. In a simple table, provide explicit row and column headers and retain its caption on mobile.

    Reference documents

    Content updated on

    Acceptance matrix to adapt to your project

    These proposed checks use synthetic cases. Decide the required behaviour with the team, record the result and assign unresolved gaps before release.

    Scroll the table horizontally to read every column. With a keyboard, focus the table area and use the arrow keys.

    Test cases, expected outcomes and useful evidence
    CaseExpected outcomeEvidence to retain
    Reading a cellRow, column and unit are identifiableCell coordinates, associated headers, unit and value announced in the reading context.
    Numeric sortingOrder and missing values are coherentSmall expected dataset
    Small screenData remains readable and reachableScroll area or cards checked
    ExportScope and units are preservedTable and file comparison

    Frequently asked questions

    How can a table retain its meaning on a phone?

    Inspect a real row with headers, units and caption at a narrow width. Make horizontal scrolling discoverable and keyboard-usable without overflowing the whole page. If offering a detailed view, retain labels and values. A screenshot cannot replace cell-to-header relationships.

    How should zero, unknown and not applicable be distinguished?

    Define each state in the legend and apply the notation consistently. Reserve zero for a genuinely measured or counted zero. A blank cell does not explain missing data. Check sorting, totals and comparisons so an unknown value does not automatically become zero in calculations or display.

    Must every column fit on a phone?

    Necessary data must remain reachable. Column selection or a detail view can help if labels preserve meaning.