Html standards
Generates, audits, and refactors HTML markup to modern WHATWG HTML5 standards and WCAG 2.1 AA accessibility guidelines. Use this whenever the user asks to write, review, refactor, clean up, or structure HTML — including snippets, components, page templates, or full pages. Also use when the user asks to fix accessibility issues, improve SEO semantics, review markup for a11y compliance, convert div-heavy markup into semantic HTML, or check whether HTML is "standards compliant." Applies even if the user only pastes raw HTML and asks for a review, or asks for HTML inside a larger task like a landing page, form, or component library — any time HTML is being authored or touched, this skill's conventions should be applied.From its SKILL.md
npx -y skills add KhaledRaedRabee/Opt-Plugins --skill html-standardsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
11.4 KB, as published. Nobody here has run it
HTML Standards
A skill for writing and reviewing HTML that is semantic, accessible, and consistently formatted. The goal isn't just "HTML that renders correctly" — it's HTML that communicates its structure to browsers, screen readers, search engines, and the next developer who opens the file.
Why this matters
A <div> tells a browser and a screen reader nothing about what it contains. A <nav> or an <article> tells them exactly what to expect, which is what lets assistive technology build a navigable outline of the page instead of forcing a user to read through everything linearly. Semantic and accessible HTML isn't a stylistic preference — it's the difference between a page that works for everyone and one that only works for people who can see a mouse cursor.
Treat every HTML-writing or HTML-reviewing task as an opportunity to apply the standards below, not just when the user explicitly asks for an "accessibility audit."
Workflow
- If reviewing/refactoring existing HTML: read the file first, then go section by section through the checklist below. Don't just skim for obvious violations — check heading order and label associations specifically, since those are the ones people miss most.
- If writing new HTML: apply the standards as you write, rather than writing div-soup first and fixing it after. It's faster and the result is cleaner.
- When done, if you made non-trivial changes, briefly summarize what changed and why (e.g., "swapped 4 divs for semantic landmarks, added labels to the 2 unlabeled inputs, fixed the heading order which skipped from h2 to h4"). Keep this summary short — a few lines, not a full report — unless the user asked for a detailed audit.
1. Semantics first
Reach for a semantic element before a <div> or <span>. Semantic elements give structure meaning for free — a screen reader user can jump straight to <main> or list all <nav> regions, but they can't do that with a <div class="nav">.
- Structural landmarks:
<header>,<nav>,<main>,<article>,<section>,<aside>,<footer>instead of generic<div>s for page regions.<section>needs an accessible name to count as a landmark — otherwise assistive tech can't distinguish it from a generic container, so it's announced (and navigable) as just "region," which isn't useful. When the section already has a visible heading, name it by pointingaria-labelledbyat that heading'sid, e.g.<section aria-labelledby="products-title"><h2 id="products-title">Our Products</h2>...</section>. This is the standard WAI-ARIA pattern for naming a landmark from existing content — don't duplicate the heading text into a separatearia-labelwhen a heading is already there to point to. A<section>with no heading at all is just a styling container, so a plain<div>is fine there.<article>is for a piece of content that would make sense distributed/syndicated on its own (a blog post, a comment, a product card).<section>is for a thematic grouping within a page. When in doubt: could this stand alone? →<article>. Is this just "part of the page"? →<section>or<div>.
- Heading structure: one
<h1>per page, and headings nest sequentially (h1→h2→h3, no skipping levels). Screen reader users often navigate by jumping between headings, so a broken sequence (h2straight toh4) reads like a missing step, not just a visual inconsistency. - Text-level semantics: use
<strong>for importance,<em>for emphasis,<code>for code,<time>for dates/times (with adatetimeattribute),<mark>for highlighted relevance — rather than wrapping text in a styled<span>or reaching for<b>/<i>to fake it. These carry meaning to assistive tech;<b>/<i>are visual-only.
2. Accessibility (WCAG 2.1 AA)
- Labels: every form input needs an associated
<label>, either wrapping the input or linked viafor/id. A placeholder is not a label — it disappears the moment the user types, and many screen readers don't announce it reliably. - Images: every
<img>needsalttext. Writealttext that conveys what the image communicates in context, not a mechanical description — "Company logo" beats "blue and white geometric logo image." Purely decorative images (spacers, background flourishes with no informational value) getalt=""so screen readers skip them entirely, rather than reading out a filename. - Keyboard reachability: anything interactive (buttons, links, form controls, custom widgets) must be reachable and operable via keyboard alone. Prefer native interactive elements (
<button>,<a href>) over<div onclick>, since native elements get keyboard support, focus states, and correct semantics for free — a clickable<div>needstabindex, arole, and manual key handling to match what<button>already does. - ARIA as a last resort, not a first instinct: reach for ARIA attributes (
aria-expanded,aria-controls,aria-live, etc.) only when semantic HTML genuinely can't express the state or relationship — e.g., a collapsible section's expanded/collapsed state, or a live region for dynamic status updates. If a native element or attribute already covers it, use that instead. The first rule of ARIA is: don't use ARIA if you don't have to. - Landmark navigation: make sure the page's landmark elements (
header,nav,main,footer, etc.) form a complete, sensible outline, so a screen reader user can jump straight to the main content or a specific region instead of tabbing through the whole page linearly.
3. Code formatting
- Soft tabs, 2-space indentation.
- Lowercase element and attribute names.
- Attribute order:
class,id,name,data-*,aria-*,src/href,alt,title. (Rationale: structural/hook attributes first, then linking/content attributes last — keeps attributes that tools and tests key off of grouped together.) - Void elements (
<img>,<input>,<br>,<hr>,<meta>,<link>) don't need a self-closing slash in HTML5 — omit it unless a specific build tool in the project requires it (some JSX-adjacent or XHTML-compat pipelines do).
Review checklist
When auditing existing markup, walk through in this order — it roughly matches how a screen reader user would encounter problems:
- Is there exactly one
<h1>, and does the heading sequence skip no levels? - Do the page regions use landmark elements, or is everything a
<div>? - Does every
<img>havealt(empty string if decorative)? - Does every form input have a real, associated
<label>? - Are interactive elements native (
<button>,<a>) where possible, and if not, do custom widgets have the rightrole,tabindex, and keyboard handlers? - Is ARIA used only where semantic HTML falls short — not sprinkled on everything?
- Formatting: 2-space indent, lowercase tags/attributes, attribute order, no unnecessary self-closing slashes.
Severity: lead with blockers, not with what's easiest to spot
Not every finding matters equally, and a report that lists a missing <label> with the same weight as a <b> that could've been <strong> buries the thing that actually breaks someone's experience. Triage findings into three tiers, and when summarizing for the user, present blockers first:
- Blockers — content or functionality is inaccessible or unusable: missing form labels, no accessible name on an interactive control, images with no
alt, keyboard-unreachable interactive elements. Fix these first; call them out explicitly even in a short summary. - Semantic/structural improvements — the page works, but its structure doesn't communicate correctly: div-soup instead of landmarks, skipped heading levels, generic
<span>where<time>/<strong>/<code>would carry meaning. Worth fixing, secondary to blockers. - Formatting/style nits — indentation, attribute order, self-closing slashes. Fix opportunistically; don't lead a summary with these.
This mirrors how accessibility tooling (e.g. axe, Lighthouse) tiers issues as critical/serious vs. moderate/minor — it's the standard way to keep an audit's priorities legible rather than a flat list of everything that technically deviates from the standard.
Before / after examples
Example 1: Navigation and content structure
Before — divs with no semantic meaning, heading levels skip from h1 to h3:
<div class="header">
<div class="logo">My Site</div>
<div class="nav">
<div class="nav-item"><a href="/">Home</a></div>
<div class="nav-item"><a href="/about">About</a></div>
</div>
</div>
<div class="content">
<h1>Welcome</h1>
<h3>Latest updates</h3>
<div class="post">
<div class="post-title">Big Announcement</div>
<div class="post-body">We shipped a new feature...</div>
</div>
</div>
<div class="footer">© 2026 My Site</div>
After — semantic landmarks, sequential headings, meaningful text-level elements:
<header>
<p class="logo">My Site</p>
<nav>
<ul>
<li><a href="/">Home</a></li>
<li><a href="/about">About</a></li>
</ul>
</nav>
</header>
<main>
<h1>Welcome</h1>
<h2>Latest updates</h2>
<article>
<h3>Big Announcement</h3>
<p>We shipped a new feature...</p>
</article>
</main>
<footer>© 2026 My Site</footer>
Example 2: Form accessibility
Before — placeholder standing in for a label, unlabeled icon button, div-as-button:
<div class="form">
<input type="email" placeholder="Email address">
<div class="submit-btn" onclick="submitForm()">Submit</div>
<div class="icon-btn" onclick="closeModal()">✕</div>
</div>
After — real label, native button, accessible name on the icon-only control:
<form>
<label for="email">Email address</label>
<input type="email" id="email" name="email">
<button type="submit">Submit</button>
<button type="button" aria-label="Close">✕</button>
</form>
Example 3: ARIA used only where needed
Before — ARIA sprinkled on a native element that didn't need it, missing state on a custom widget:
<button role="button" aria-label="Toggle menu" class="menu-toggle" onclick="toggle()">Menu</button>
<div class="menu-panel" style="display:none">...</div>
After — no redundant role on a native <button>; aria-expanded/aria-controls added where semantic HTML can't express the open/closed state:
<button class="menu-toggle" aria-expanded="false" aria-controls="menu-panel" onclick="toggle()">Menu</button>
<div id="menu-panel" class="menu-panel" hidden>...</div>
(Note: role="button" on a <button> is redundant — the element already has that role implicitly. aria-expanded is kept because there's no native HTML attribute for "this control's panel is currently open.")