1---2description: Simple web development with HTML, CSS, JS, and HTMX. Use when working3 with .html, .css, or .htmx files, web templates, stylesheets, or vanilla JS scripts.4 NOT for React/Vue/Angular (use writing-typescript) or Node.js backends.5name: writing-web6metadata:7 source: https://skillmd.com/skills/alexei-led/writing-web8---910# Web Development1112## Scope1314- Use for HTML, CSS, HTMX, vanilla JS, and server-rendered templates.15- Do not use for React, Vue, Angular, TypeScript, Node.js backends, or app architecture.16- Follow existing template language, asset pipeline, framework, accessibility, and security conventions.17- Do not add a dependency, build step, or framework unless the project already uses it or the user approves.1819## Reference Reads2021- Read `references/patterns.md` before layout, behavior, accessibility, or security changes; skip for copy-only edits.2223## Defaults2425- Prefer semantic HTML and CSS; add HTMX or JS only when native browser behavior is insufficient.26- Use mobile-first, fluid CSS. Put repeated design tokens in custom properties; keep one-off values local.27- Preserve usable links and forms when practical.28- Treat accessibility, responsive behavior, and safe rendering as required behavior.29- Escape untrusted output; avoid `innerHTML` unless project sanitizer marks content trusted.3031## Comments3233- Use HTML comments only for template boundaries, generated blocks, or security assumptions that are not obvious from markup.34- Use CSS comments for non-obvious hacks, browser constraints, or integration boundaries.35- Use JS comments only for non-obvious constraints, invariants, side effects, tradeoffs, or browser quirks.36- Keep comments short. Move longer rationale to docs, issue links, or design notes.37- Do not comment obvious markup, selectors, declarations, or event handlers.38- Keep UI tests readable without comments; add one only for unobvious fixtures, browser setup, timing, or regression context.3940## Verification4142- Run project-configured format, lint, validation, tests, and browser checks for the changed files.43- For UI changes, check mobile and desktop widths plus keyboard navigation.44- For changed interactive behavior, run a browser test or state why it was skipped.45- If a check is unavailable, state the gap and run the closest configured gate.46- For rendered-browser verification (screenshots, live interaction, cross-viewport checks), use `browser-automation`.4748## Failure Handling4950- HTML or accessibility validation fails: fix the markup; do not suppress configured checks.51- HTMX request does not fire: check trigger, target, swap, response status, and CSRF/auth headers before adding JS fallback.52- Project conventions or checks are unclear: inspect config first; if still unclear, state the assumption and smallest safe gate.53- Broad, risky, or destructive change: state the risk and ask before acting. Do not run destructive commands.5455## Final Response5657- Files changed:58- Checks:59- Skipped checks:60- Risks/follow-ups: