agentleFS
bkjain655bkjain655/agent-skills/skills/html-semantic-markup/SKILL.md

html-semantic-markup

Skill0 starsChanged 3 months agoMITView on GitHub

Semantic HTML patterns: landmarks, headings, lists, tables, forms, and accessible document structure for React/Next.js. Use when writing page markup, fixing SEO structure, or replacing div soup with proper HTML elements.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Don't skip levels for styling — use CSS for size:

    line 27
  2. Very specific:

    Use <ul>/<ol> for navigation groups, feature lists, steps — not nested divs.

    line 39
  3. Very specific:

    Never use <table> purely for CSS grid layout.

    line 68
  4. Very specific:

    Don't use <div onClick> for primary actions without role + keyboard support.

    line 90

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Semantic HTML

Page skeleton

<body>
  <a href="#main" class="skip-link">Skip to main content</a>
  <header>...</header>
  <nav aria-label="Main">...</nav>
  <main id="main">...</main>
  <footer>...</footer>
</body>

One <h1> per page (Server Component hero is ideal for SEO).

Heading hierarchy

Don't skip levels for styling — use CSS for size:

<h1>Page title</h1>
<section>
  <h2>Section</h2>
  <h3>Subsection</h3>
</section>

Lists

Use <ul>/<ol> for navigation groups, feature lists, steps — not nested divs.

<ol>
  {steps.map((step, i) => (
    <li key={step.id}>
      <h3>{step.title}</h3>
      <p>{step.description}</p>
    </li>
  ))}
</ol>

Tables — data vs layout

Data tables (cash flow, comparisons):

<table>
  <caption className="sr-only">Monthly breakdown</caption>
  <thead>
    <tr><th scope="col">Item</th><th scope="col">Amount</th></tr>
  </thead>
  <tbody>...</tbody>
</table>

Chart fallback tables: className="sr-only" with caption — see web-accessibility-wcag.

Never use <table> purely for CSS grid layout.

Forms

<form onSubmit={...}>
  <label htmlFor="name">Name</label>
  <input id="name" name="name" type="text" autoComplete="name" required />
</form>

Group related fields with <fieldset> + <legend> when appropriate.

Interactive elements

ElementUse for
<button type="button">Actions (open dialog, toggle)
<button type="submit">Form submit
<a href="...">Navigation to URL
<Link href="...">Next.js client navigation

Don't use <div onClick> for primary actions without role + keyboard support.

JSON-LD & meta

Structured data via <script type="application/ld+json"> in Server Components — see nextjs-seo-metadata.

Anti-patterns

  • Multiple <main> elements
  • <p> wrapping block-level components
  • Placeholder <div> buttons instead of <button>
  • Missing <th scope> in data tables

Pair with: web-accessibility-wcag, react-components-patterns.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.