Skip to content
Back to skills

Html Table

ASecurity

Build an accessible, responsive data table with sortable columns, proper headers, and a sensible mobile layout.

  • 3 stars
  • 0 votes
  • 1 copy
  • 4 views
  • Added September 3, 2026
ai-agentsgo

Works with

  • cli

Security analysis

A100/100

Scanned September 3, 2026

npx -y skills add black141312/ada --skill html-table --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Html Table?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Html Table
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/black141312-html-table/badge)](https://www.skillsdirectory.com/skills/black141312-html-table)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: html-table
description: Build an accessible, responsive data table with sortable columns, proper headers, and a sensible mobile layout.
category: html
---

# HTML Table

Use for presenting tabular data (dashboards, reports, listings). The goal is correct table semantics plus optional client-side sorting that stays accessible.

1. Use real table structure: `<table>` with `<caption>`, `<thead>`, `<tbody>`, and `<th scope="col">` / `<th scope="row">` so screen readers announce header context.
2. Add sorting on `<th>` headers: a `<button>` inside the header cell, `aria-sort="ascending|descending|none"` reflecting state, sorting `<tbody>` rows in JS (stable sort, type-aware for numbers/dates).
3. Keep keyboard support: header sort controls are real buttons (focusable, Enter/Space activate); don't trap focus.
4. Handle overflow responsively: wrap in a scroll container (`overflow-x:auto` with `tabindex="0"` and an `aria-label`), or restructure to stacked cards under a breakpoint with data labels.
5. Style for scanability: zebra striping via `:nth-child`, sticky `<thead>` for long tables, right-align numeric columns, and clear sort-direction indicators.
6. For large datasets add pagination or virtualization rather than rendering thousands of rows; announce row counts and sort changes via a polite live region.

## Rules
- Tables are for tabular data only — never for page layout.
- Always include `scope` on header cells (and `headers`/`id` for complex multi-level headers).
- Reflect sort state in `aria-sort` and keep the sort control a real `<button>`, not a clickable `<div>`.
- Provide an accessible name (`<caption>` or `aria-label`) describing what the table contains.
- For horizontal scroll, make the scroll container keyboard-focusable so it's reachable without a mouse.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.