html-craft
Write semantic, accessible HTML — structure before styling, real controls, valid markup.
SKILL.mdskills/html-craft/SKILL.md
GitHubHTML Craft
HTML is the foundation: get the structure and semantics right and accessibility, SEO, and maintainability come almost free.
When to use
- Any user-facing page or component markup.
- Accessibility fixes and markup reviews.
Method
- Structure first: one
<h1>per page, logical heading order; landmarks (header/nav/main/footer); sections with real meaning. - Semantic elements:
nav,main,article,section,figure/figcaption,time— ask "what is this?" before reaching fordiv. - Real controls:
buttonfor actions,afor navigation,labelbound to every input,fieldset/legendfor groups; never clickabledivs. - Text alternatives: meaningful
altfor content images; emptyaltfor decorative; captions for media. - Data tables: only for data —
<thead>,<th scope>,<caption>; never for layout. - Document hygiene:
langon<html>, viewport meta, charset first, descriptive<title>. - ARIA — sparingly: native semantics first; ARIA only to fill real gaps, never to fake controls.
- Validate: W3C validator / htmlhint clean; no invalid nesting (
<a>in<a>, block in inline).
Quality gates
- Validator-clean markup.
- Keyboard-only pass of every interactive element.
- Every image has appropriate alt text; every input has a label.
- Heading order logical; one main landmark.
Red lines
- No
div/spanwith click handlers. - No layout tables; no missing
lang/title.
Related
ux-ui-design · frontend-engineering · javascript-engineering.