StealThis .dev

Science — Scientific Data Table

A publication-grade scientific results table built in vanilla HTML, CSS, and JavaScript. Column headers carry units, numeric values align on the decimal point with consistent significant figures, and measurements display as mean plus-or-minus standard deviation in monospace. Footnote markers, a highlighted best-result row, zebra striping, and a sticky header keep dense data legible. Click any header to sort ascending or descending, then export the current ordering with a one-click Download CSV button that builds a Blob in the browser.

Open in Lab
html css vanilla-js
Targets: JS HTML

Code

Scientific Data Table

A reusable results table styled for a journal supplement. It opens with a bold Table 1. caption describing the experiment, then renders nine fictional electrocatalysts with their loading, Faradaic efficiency, partial current density, overpotential, and stability. Every numeric column header carries an SI unit, values are right-aligned and set in JetBrains Mono so decimal points line up, and each measurement reads as 12.34 ± 0.05 with a muted uncertainty and superscript footnote markers.

The header is sticky and the body scrolls inside a bordered, focusable region with zebra striping for row tracking. Clicking a column header sorts the data — numeric columns default to descending (best-first) and the catalyst name sorts alphabetically — with the active column showing an arrow and the correct aria-sort state. The highlighted best-result row keeps its teal accent and badge across every sort. A short toast confirms each action.

A Download CSV button serializes the table in its current sort order into a properly escaped CSV string, wraps it in a Blob, and triggers a download entirely client-side. Below the table, a LaTeX-styled display equation and discipline-correct figure footnotes round out the publication look. All controls are keyboard-operable with visible focus rings and the layout reflows cleanly down to about 360px.

Illustrative UI only — fictional authors, data, and figures; not real scientific results.