Skip to content
Skills Library
Programming · Building & coding

html

/html

HTML rules for projects following the air-gapped, semantic-only architecture. Defines the only allowed elements, the only allowed attributes, the only allowed patterns for interactive elements, and the canonical layout shell. Use whenever writing or reviewing markup, defining custom elements, or shaping the DOM.

Repository
ai ↗
Licence
MIT
Last repository change
04.09.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
5
Scripts
0
HTML comments
0
URLs in SKILL.md
12
Deprecation

No signals detected. Repository changed on 04.09.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

HTML rules for projects following the air-gapped, semantic-only architecture. Defines the only allowed elements, the only allowed attributes, the only allowed patterns for interactive elements, and the canonical layout shell. Use whenever writing or reviewing markup, defining custom elements, or shaping the DOM.

Original author description

HTML rules for projects following the air-gapped, semantic-only architecture. Defines the only allowed elements, the only allowed attributes, the only allowed patterns for interactive elements, and the canonical layout shell. Use whenever writing or reviewing markup, defining custom elements, or shaping the DOM.

How it works

  1. Only these elements are allowed
  2. div and span are forbidden
  3. Only these attributes are permitted on markup elements
  4. The interactive-element pattern
  5. Disabled state
  6. The canonical shell
  7. Forms
  8. Card pattern
  9. Scrollable containers
  10. Custom elements
Original SKILL.md headings · 181 lines, 1,022 words
SKILL.md preview
---
name: html
description: HTML rules for projects following the air-gapped, semantic-only architecture. Defines the only allowed elements, the only allowed attributes, the only allowed patterns for interactive elements, and the canonical layout shell. Use whenever writing or reviewing markup, defining custom elements, or shaping the DOM.
license: MIT
metadata:
  version: "1.0.0"
---

# HTML

HTML is structure only. Semantic. Static. Pre-defined.

## Only these elements are allowed

82 elements. Anything not on this list is forbidden.

**Document:** `html`, `head`, `body`, `title`, `meta`, `link`, `script`, `noscript`, `template`, `slot`

**Layout regions:** `header`, `nav`, `main`, `aside`, `footer`, `article`, `section`, `hgroup`, `address`, `search`

**Headings and text:** `h1`, `h2`, `h3`, `h4`, `h5`, `h6`, `p`

**Lists:** `ul`, `ol`, `li`, `dl`, `dt`, `dd`

**Tables:** `table`, `thead`, `tbody`, `tfoot`, `tr`, `th`, `td`, `caption`, `colgroup`, `col`

**Forms:** `form`, `fieldset`, `legend`, `label`, `input`, `select`, `option`, `optgroup`, `textarea`, `output`

**Media:** `figure`, `figcaption`, `picture`, `source`, `img`, `video`, `audio`, `track`

**Interactive:** `details`, `summary`, `dialog`, `menu`, `a`

**Inline semantic:** `time`, `mark`, `abbr`, `cite`, `code`, `pre`, `blockquote`, `q`, `strong`, `em`, `small`, `sub`, `sup`, `br`, `hr`, `wbr`

**Custom elements:** Any name containing a hyphen (e.g., `app-container`, `app-logo`, `app-user`, `app-legal`, `app-version`, `app-banner`).

## `div` and `span` are forbidden

Always. The architecture is div-less and span-less.

Use the semantic element whose **main semantic purpose** matches the intent. A semantic element is never repurposed for a meaning it does not own. (No `<address>` standing in for "any contact-shaped block." No `<aside>` standing in for "anything off to the side.")

If no semantic element's main purpose fits, **the design is flawed**. Stop. Go to the parent element. Re-engineer the design until a semantic element fits its main purpose. The architecture does not bend. A better design must be found or engineered. This forces quality engineering over quick or convenient fixes and preserves clean, consistent styling for the entire SDLC.

Custom elements are not an escape hatch for "no semantic fits." Custom elements exist in exactly two finite categories:

1. **AutoCSS standard layout elements** — the curated set authored by AutoCSS: `<app-container>`, `<app-logo>`, `<app-user>`, `<app-legal>`, `<app-version>`, `<app-banner>`. Finite. Part of the architecture's canonical shell. Not extended by ad-hoc additions.
2. **Data-table row elements** — generated at runtime from JSON keys via `toTagName()`. Used inside `<ul>` / `<li>` for list-rendered tabular content. See the `data-flow` skill.

Anything outside those two categories is forbidden. If a new shape genuinely needs accommodation, surface it to the user before adding — never invent a new custom element to paper over a design problem.

## Only these attributes are permitted on markup elements

- The native attributes defined for that element by the HTML specification (`href`, `src`, `type`, `name`, `value`, `for`, `action`, `method`, `alt`, `lang`, etc.)
- ARIA attributes (`role`, `aria-*`)
- Native state attributes (`open`, `hidden`, `disabled`, `required`, `checked`, `selected`)

**Forbidden attributes:** `class`, `id`, `data-*`, every `on*=` event handler attribute (including `onclick`, `oninput`, `onchange`, `onsubmit`, `onkeydown`, `onkeyup`, `onmousedown`, `onmouseup`, `onmouseover`).

There is no JavaScript in HTML markup. Ever. The `oninput` event used for the CRUD lifecycle is wired in `assets/js/oninput.js`, not in markup.

`style` attributes are forbidden. `<style>` tags are forbidden. CSS lives in `.css` files only.

## The interactive-element pattern

Interactive elements that are not intrinsically interactive (like `<button>`) use a hidden input inside a `<label>`. CSS reads the input's checked state via `:has()` and `:checked`.

**Form actions** use checkboxes:

```html
<label role="button" aria-label="Save">
  Save
  <input type="checkbox" aria-hidden="true" />
</label>
```

**Navigation** uses radios inside `<nav>`:

```html
<nav>
  <label>
    <input type="radio" name="nav" aria-hidden="true" />
  </label>
</nav>
```

The `aria-hidden="true"` keeps the input out of the accessibility tree; the label carries the accessible name and role. CSS hides the input visually via `[aria-hidden="true"] { display: none; }`. See `references/state-machines.md`.

`<button>` may be used where its native semantics fit. Never substitute a button for the label/input pattern.

## Disabled state

Disabled state on interactive elements is conveyed with `aria-disabled` (assistive-tech aware) and styled by CSS via `[aria-disabled="true"]`. The native `disabled` attribute is used only on form controls where the browser-supplied disabled semantic exactly matches the intent.

```html
<label role="button" aria-disabled="true" aria-label="Save">
  Save
  <input type="checkbox" aria-hidden="true" />
</label>
```

CSS reads via `[aria-disabled="true"]` and applies the disabled appearance.

## The canonical shell

A single `index.html` at project root. The shell is the same on every page; only the data inside changes.

```html
<app-container>
  <app-banner></app-banner>
  <header>
    <app-logo></app-logo>
    <app-user></app-user>
  </header>
  <nav>
    <label><input type="radio" name="nav" aria-hidden="true"></label>
  </nav>
  <main>
    <article>
      <h1></h1>
      <section></section>
    </article>
  </main>
  <aside></aside>
  <footer>
    <app-legal></app-legal>
    <app-version></app-version>
  </footer>
  <app-banner></app-banner>
</app-container>
<script type="module" src="assets/js/app.js"></script>
```

`<script type="module">` is one tag, outside `<app-container>`, immediately before `</body>`.

No layout wrappers. CSS Grid handles every region — see the `css` skill.

## Forms

Forms wrap fields in `<fieldset>` with a `<legend>`. Schema and rules come from JSON, not from HTML. See the `data-flow` skill.

## Card pattern

Cards exist only in plural as `ul` / `li`. Cards are not identity-bearing on their own. Use `<article>` only when a card has independent identity (a standalone post, a single product detail page) — not for repeated rows.

## Scrollable containers

Only `<section>`, `<ul>`, and `<ol>` are scrollable containers. No other element receives `overflow: auto` or `overflow: scroll`.

## Custom elements

Custom elements must contain a hyphen (HTML spec requirement). They carry no behavior on their own — they are semantic anchors for layout regions and content slots. JavaScript does not extend them. CSS targets them like any other element.

Generated custom elements (from JSON content) follow the naming rule in the `naming` skill: `toTagName()` produces a valid hyphenated tag from a JSON key.

## What HTML never does

- No JavaScript anywhere in markup
- No styling decisions
- No state storage outside native attributes (`checked`, `open`, `selected`)
- No layout via wrapper elements
- No content that should come from JSON

## Baseline & support

_Checked against MDN as of 2026-07-16._

- `<search>` — **Baseline Widely available** — https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/search
- `<dialog>` — **Baseline Widely available** — https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/dialog
- `<details>` / `<summary>` — **Baseline Widely available** — https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/details
- `<output>` — **Baseline Widely available** — https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/output
- `<slot>` — **Baseline Widely available** — https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/slot
- `<template>` — **Baseline Widely available** — https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/template
- Custom elements (autonomous) — **Baseline Widely available** — https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_custom_elements
- `:has()` — **Baseline Widely available** — https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/:has

**Canonical rules:** https://github.com/Autocss-com/ai/blob/main/AGENTS.md

## References

- `references/state-machines.md` — checkbox and radio patterns inside labels
- `references/shell-layout.md` — full Holy Grail markup with regions
- `references/forms.md` — fieldset, legend, label patterns
- `references/custom-elements.md` — naming, semantics, no-behavior rule
- HTML element index: https://developer.mozilla.org/en-US/docs/Web/HTML/Element
- ARIA roles: https://www.w3.org/TR/wai-aria-1.2/
- Custom elements: https://html.spec.whatwg.org/multipage/custom-elements.html
Files in this package (5)
  • SKILL.md 9 KB
  • references/custom-elements.md 5 KB
  • references/forms.md 4 KB
  • references/shell-layout.md 4 KB
  • references/state-machines.md 4 KB

Versions

RepositoryScoreLicence
This page · autocss-com/ai100MIT
brolag/neural-claude-code100MIT
danielmiessler/LifeOS95MIT
eliasstravik/skills90MIT
plannotator/effective-html90MIT
clawic/skills90MIT

Database snapshot: 13.11.2026 · package version 5aada48e4952 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100json
    JSON rules for projects following the air-gapped, declarative-first architecture. JSON carries data only — no HTML, no CSS, no styling, no presentation hints. The JSON shape drives the UI because CSS reacts to data presence and absence in the DOM. Use whenever shaping API…
  • 100html5-semantic-elements
    Use when reviewing templates, rendered HTML, or shared components related to Use semantic HTML elements. Validate the final browser-facing markup, not just the source framework abstraction.
  • 100web-components-custom-elements
    Use this skill when authoring framework-agnostic Custom Elements, Shadow DOM encapsulations, and HTML templates using the Web Components standard.
  • 100architecture
    Entry point for projects following the air-gapped, browser-native, declarative-first architecture. Defines the layer separation (html, css, javascript, json) and routes to the concern skill for any task. Use when starting any work, when in doubt which concern owns a task, or…
  • 100building-playhtml-elements
    Use when building, creating, or implementing a playhtml element or component, whether in vanilla HTML or React. Triggers include requests to make interactive, collaborative, real-time, or multiplayer HTML elements.
  • 90fe-html
    Writes and reviews HTML documents and templates (plain HTML, JSX, Vue, Svelte, Astro, Angular) with valid structure, semantic elements, landmarks, headings, images and buttons that work for everyone. Use when creating or editing markup, a page layout or a document head, or when…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.