← All elements
<table class="hh"><caption>Study hours</caption><thead><tr><th></th><th>M</th><th>T</th><th>W</th><th>T</th><th>F</th></tr></thead><tbody><tr><th>Wk 1</th><td data-l="1">1</td><td data-l="3">3</td><td data-l="0">0</td><td data-l="2">2</td><td data-l="4">4</td></tr><tr><th>Wk 2</th><td data-l="2">2</td><td data-l="4">4</td><td data-l="3">3</td><td data-l="1">1</td><td data-l="2">2</td></tr><tr><th>Wk 3</th><td data-l="4">4</td><td data-l="2">2</td><td data-l="4">4</td><td data-l="3">3</td><td data-l="0">0</td></tr></tbody></table>About this table
A weekly activity table shaded by level, built as a real HTML table so the values stay readable.
How it works
It is an ordinary table with a caption, column headings and row headings. Each cell carries a data-l level, and attribute selectors paint five shades of green. The number stays inside the cell, so the shade is a hint on top of real data.
Ways to customise it
- Change the five level colours.
- Add weeks or days as rows and cells.
- Set data-l from your own values.
Good to know
Using a table means screen readers can announce the week and day for each value. Check text contrast if you change the shades.
Open an example, copy the HTML and the CSS, and paste them into your page. There is nothing to install and no JavaScript to load.