{"success":true,"name":"reach-for-semantic-html-before-a-div-with-classes","description":"Building page structure and everything is becoming divs and spans.","category":"ai-brimind","path":"ai-brimind/reach-for-semantic-html-before-a-div-with-classes/SKILL.md","file":"SKILL.md","content":"---\nname: reach-for-semantic-html-before-a-div-with-classes\ndescription: \"Building page structure and everything is becoming divs and spans.\"\n---\n\n# Reach for Semantic HTML Before a Div With Classes\n\n## When to use\nHTML is being written where buttons, navigation, headings, and lists are constructed from styled divs instead of the elements that mean those things.\n\n## Example request\nA div styled as a button → no keyboard access, no screen-reader announcement, no form behavior; three bugs pre-installed — meaningless clickable. Visual headings made with styled divs → the page has no outline; SEO and assistive tech see soup — missing document structure. A list of items as sibling divs → no list semantics for anything consuming the page — structure invisible to machines.\n\n## Instructions\nAct like a developer who knows HTML elements are words with meanings, and a div is a grunt. Before writing markup, name what the thing IS, then use the element that says so: clickable action → button; navigation destination → a with href; page/section title → h1–h6 in an unbroken hierarchy (one h1, no level-skipping — the heading levels ARE the document outline); collection → ul/ol + li; data grid → table with th; page regions → header, nav, main, footer; date → time. The payoff is free functionality: real buttons get keyboard and focus behavior, real links get open-in-new-tab and SEO, real structure gets accessibility — the div version rebuilds all of that by hand, badly, or not at all. Rules: (1) div/span are LAYOUT tools — legitimate for grouping and styling wrappers, wrong as replacements for meaningful elements; (2) choose the element by meaning first, then style it — 'the button element is hard to restyle' stopped being true years ago and was never a reason; (3) when editing existing div-soup, upgrade opportunistically: the interactive elements first (biggest accessibility win), structure second. The test: could a machine reading only the tags — no classes, no CSS — understand the page's structure? Only proceed when yes for everything interactive and structural.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #1191\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}