Skip to main content
skill CX Codex

html · mindrally — Claude Code skill: what it does, how to install

This skill guides semantic HTML, forms, accessibility, and document structure. Use it when an agent needs consistent markup for frontend pages.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add Mindrally/skills --skill html -a claude-code
Open on GitHub

What html does

The skill guides an agent through semantic page structure and content markup, including header, main, footer, nav, article, section, headings, and lists. It covers links, buttons, forms, images, video, and audio. Form guidance includes labels, input types, fieldset, legend, and validation attributes.

It also covers ARIA landmarks and attributes, document metadata, W3C validation, lowercase markup, and deprecated presentation elements such as <font> and <center>. The guide includes HTMX attributes such as hx-get, hx-post, hx-target, hx-swap, hx-confirm, and hx-push-url, plus Bootstrap markup and utility classes. Prefer native HTML over ARIA when native semantics can express the behavior.

Performance guidance includes defer and async for scripts, loading="lazy" for below-fold images, and <link rel="preload"> for critical resources. Installation places the skill in a platform-specific SKILL.md path.

What it helps with

  • choose semantic elements for a page layout
  • connect form labels to inputs and add validation
  • mark up media with accessible alternatives
  • review ARIA landmarks and attributes
  • add HTMX behavior to existing markup

Example prompts for the agent

  • Review this page and replace clickable div and span elements with suitable HTML controls.
  • Build the form with associated label elements, fieldset, legend, and validation attributes.
  • Add accessible image markup, then update the result with hx-target and hx-swap.

How to install html

1Skills CLI (Vercel)

npx skills add Mindrally/skills --skill html -a claude-code

2Manually: put the files in place

~/.claude/skills/html/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/html/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about html

How do I install html in Claude Code?

Run npx skills add Mindrally/skills --skill html -a claude-code, then use ~/.claude/skills/html/SKILL.md.

What does the html skill do?

It gives agents rules for semantic markup, document structure, forms, ARIA, media, metadata, HTMX, and Bootstrap.

When should the skill use ARIA?

Use ARIA when native HTML semantics cannot express the needed meaning or behavior. Its attributes should match how the element actually works.

Source text

SKILL.md · Apache-2.0
---
name: html
description: Guidelines for semantic HTML markup, document structure, forms, accessibility attributes, and modern HTML best practices
metadata:
  maintainer: Mindrally
  source: https://github.com/Mindrally/skills
---

# HTML Development Guidelines

## Core Principles

- Write semantic HTML to improve accessibility and SEO
- Use appropriate elements for their intended purpose
- Ensure proper document structure and hierarchy
- Prioritize accessibility by using ARIA roles and attributes when needed

## Semantic Elements

### Document Structure
- Use `<header>` for introductory content and navigation
- Use `<main>` for the primary content (one per page)
- Use `<footer>` for footer content
- Use `<nav>` for navigation sections
- Use `<aside>` for tangentially related content

### Content Sections
- Use `<article>` for self-contained, distributable content
- Use `<section>` for thematic grouping of content
- Use appropriate heading hierarchy (`<h1>` through `<h6>`)
- Only one `<h1>` per page, representing the main topic

### Text Content
- Use `<p>` for paragraphs
- Use `<ul>`, `<ol>`, `<dl>` for lists appropriately
- Use `<blockquote>` for quotations
- Use `<figure>` and `<figcaption>` for illustrations

## Interactive Elements

### Buttons and Links
- Use `<button>` for clickable actions that don't navigate
- Use `<a>` for links that navigate to URLs
- Always include `href` attribute on links
- Never use `<div>` or `<span>` for clickable elements

### Forms
- Use `<form>` with proper `action` and `method` attributes
- Associate labels with inputs using `for` attribute
- Use appropriate input types (`email`, `tel`, `number`, etc.)
- Group related inputs with `<fieldset>` and `<legend>`
- Include validation attributes (`required`, `pattern`, `min`, `max`)

## Media Elements

### Images
- Always include `alt` attribute for images
- Use descriptive alt text for informational images
- Use empty `alt=""` for decorative images
- Use `srcset` and `sizes` for responsive images
- Include `width` and `height` to prevent layout shift

### Video and Audio
- Provide captions and transcripts
- Include multiple source formats for compatibility
- Use `poster` attribute for video thumbnails
- Consider autoplay impact on user experience

## Accessibility (ARIA)

### When to Use ARIA
- Use ARIA when native HTML semantics are insufficient
- Prefer native HTML elements over ARIA when possible
- Ensure ARIA attributes match actual element behavior

### Common ARIA Attributes
- `aria-label` for accessible names
- `aria-describedby` for additional descriptions
- `aria-hidden` for decorative elements
- `aria-expanded` for expandable sections
- `aria-live` for dynamic content updates

### Landmarks
- Use landmark roles to define page regions
- Ensure all content is within a landmark
- Use `role="main"`, `role="navigation"`, etc., only when semantic elements aren't available

## Best Practices

### Document Meta
- Include proper `<!DOCTYPE html>` declaration
- Set language attribute on `<html>` element
- Include viewport meta tag for responsive design
- Use appropriate meta tags for SEO

### Code Quality
- Validate HTML using W3C validator
- Maintain consistent indentation
- Close all tags properly (including self-closing)
- Use lowercase for element names and attributes

### Deprecated Elements
- Avoid `<font>`, `<center>`, `<b>`, `<i>` for styling
- Use CSS for visual presentation
- Use `<strong>` and `<em>` for semantic emphasis

## HTMX Integration

When using HTMX for interactivity:
- Use `hx-get`, `hx-post` attributes for server requests
- Leverage `hx-target` to specify update targets
- Use `hx-swap` to control how content is inserted
- Implement `hx-confirm` for critical actions
- Use `hx-push-url` for URL updates without full refresh

## Bootstrap Integration

When using Bootstrap:
- Leverage Bootstrap's grid system for layouts
- Use Bootstrap components with proper markup structure
- Include necessary ARIA attributes with components
- Use Bootstrap's utility classes for spacing and typography
- Minimize custom CSS by using Bootstrap classes

## Performance

- Minimize DOM depth and complexity
- Load scripts with `defer` or `async` when appropriate
- Use `loading="lazy"` for below-fold images
- Preload critical resources with `<link rel="preload">`

© Mindrally · Apache-2.0 · Mindrally/skills

Similar skills

Everything for Frontend and UI →

html by other authors comes first.

From the same set236

css This skill hands the agent a set of CSS rules: Flexbox, Grid, custom properties, BEM and specificity control. Useful when AI writes your styles. CX Codex +1 1,200installs modern-web-development A rule set for the modern web stack: TypeScript, Next.js 14, React Server Components, Supabase, GraphQL and Tailwind CSS. Useful when your agent writes frontend and API code in the same repo. CX Codex +1 1,200installs ci-cd-best-practices Provides guidelines for automated pipelines, testing workflows, and zero-downtime deployment patterns. Works with assistants supporting pipeline generation and DevOps tasks. CX Codex +1 1,200installs selenium-automation A skill that steers your coding agent toward solid Selenium WebDriver tests: Page Object Model, explicit waits, stable locators. CX Codex +1 1,200installs systemverilog A skill that gives your agent SystemVerilog rules for FPGA and ASIC work: modular structure, synchronous design, timing closure and verification. CX Codex +1 1,100installs fpga SystemVerilog and Vivado hardware design guidelines covering timing closure, AXI interfaces, resource savings, and testbench verification. CX Codex +1 1,100installs php-development This skill makes your coding agent write PHP 8+ the disciplined way: SOLID, PSR-12, strict types, PHPUnit tests. Useful once a PHP codebase outgrows one person's habits. CX Codex +1 1,100installs playwright Skill for automating E2E testing of web applications in TypeScript and JavaScript. Teaches agents to write tests following best practices: resilient locators, web-first assertions, no hardcoded timeouts. CX Codex +1 1,100installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor