html-development
Skill1 starsChanged 11 months agoISCView on GitHub
Best practices for writing semantic, accessible, and performant HTML. Use when working with .html files or creating web page structure.
In this repository13 other files it gives its agents.
- ai-development-assistantSkill
- angular-developmentSkill
- bun-package-managerSkill
- css-developmentSkill
- go-developmentSkill
- javascript-developmentSkill
- npm-package-managerSkill
- pnpm-package-managerSkill
- python-developmentSkill
- react-developmentSkill
- rust-developmentSkill
- typescript-developmentSkill
- vue-developmentSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
25 rules. About 0 are common, 23 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈23
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Use this skill when:
- Distinctive: line 20
Semantic HTML: Use elements that convey meaning (header, nav, main, article, section, footer).
- Distinctive: line 21
Document Structure: Always include proper DOCTYPE, html, head, and body elements.
- Distinctive: line 22
Valid HTML: Write valid, well-formed HTML.
- Distinctive: line 24
Progressive Enhancement: Ensure content works without JavaScript first.
- Distinctive: line 74
Alt Text: Always provide alt attributes for images
- Distinctive: line 75
ARIA Labels: Use aria-label, aria-labelledby when semantic HTML isn't enough
- Distinctive: line 76
ARIA Roles: Use roles to define purpose (role="button", role="navigation")
- Distinctive: line 78
Focus Management: Ensure logical tab order
- Distinctive: line 79
Form Labels: Always associate labels with form inputs
- Distinctive: line 80
Landmarks: Use landmark roles for page regions
- Very specific: line 93
Always use <label> elements associated with inputs
- Distinctive: line 95
Use appropriate input types (email, tel, number, date)
- Distinctive: line 97
Use autocomplete attributes appropriately
- Very specific: line 121
Use <img> for content images, CSS for decorative
- Distinctive: line 122
Always include alt attribute
- Distinctive: line 123
Use srcset for responsive images
- Distinctive: line 124
Consider lazy loading for below-fold images
- Distinctive: line 171
Use descriptive link text (not "click here")
- Distinctive: line 173
Use rel attributes appropriately
- Distinctive: line 193
Use tables for tabular data only
- Distinctive: line 195
Add caption for context
- Distinctive: line 219
Use lazy loading for images and iframes
- Distinctive: line 221
Use async/defer for scripts
- Distinctive: line 257
Before submitting HTML code, verify:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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.
Files
HTML Development Skills
When to Use This Skill
Use this skill when:
- Creating or modifying HTML documents (.html files)
- Building web page structure and layout
- Implementing accessible web content
- Working with HTML5 semantic elements
- Creating forms and interactive elements
I. HTML Fundamentals
- Semantic HTML: Use elements that convey meaning (header, nav, main, article, section, footer).
- Document Structure: Always include proper DOCTYPE, html, head, and body elements.
- Valid HTML: Write valid, well-formed HTML. Use validators to check.
- Accessibility First: Build with accessibility in mind from the start.
- Progressive Enhancement: Ensure content works without JavaScript first.
II. Document Structure
Standard HTML5 Structure:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Page description">
<title>Page Title</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<nav><!-- Navigation --></nav>
</header>
<main>
<article><!-- Main content --></article>
</main>
<footer><!-- Footer --></footer>
<script src="script.js"></script>
</body>
</html>III. Semantic Elements
Layout Elements:
<header>: Introductory content or navigation<nav>: Navigation links<main>: Main content (only one per page)<article>: Self-contained content<section>: Thematic grouping of content<aside>: Tangentially related content<footer>: Footer for section or page
Text Elements:
<h1>to<h6>: Headings (maintain hierarchy)<p>: Paragraphs<blockquote>: Quotations<figure>/<figcaption>: Images with captions<code>/<pre>: Code blocks<mark>: Highlighted text<time>: Dates and times
IV. Accessibility (a11y)
- Alt Text: Always provide alt attributes for images
- ARIA Labels: Use aria-label, aria-labelledby when semantic HTML isn't enough
- ARIA Roles: Use roles to define purpose (role="button", role="navigation")
- Skip Links: Provide skip navigation links
- Focus Management: Ensure logical tab order
- Form Labels: Always associate labels with form inputs
- Landmarks: Use landmark roles for page regions
Key ARIA Attributes:
aria-label: Accessible namearia-labelledby: References labeling elementaria-describedby: References describing elementaria-hidden: Hide from assistive technologyaria-expanded: Expandable element statearia-live: Dynamic content announcements
V. Forms
Form Best Practices:
- Always use
<label>elements associated with inputs - Group related inputs with
<fieldset>and<legend> - Use appropriate input types (email, tel, number, date)
- Provide helpful placeholder text
- Use autocomplete attributes appropriately
- Include validation and error messages
<form action="/submit" method="POST">
<fieldset>
<legend>Contact Information</legend>
<label for="name">Full Name</label>
<input type="text" id="name" name="name" required
autocomplete="name">
<label for="email">Email</label>
<input type="email" id="email" name="email" required
autocomplete="email">
</fieldset>
<button type="submit">Submit</button>
</form>VI. Images & Media
Images:
- Use
<img>for content images, CSS for decorative - Always include alt attribute
- Use srcset for responsive images
- Consider lazy loading for below-fold images
<img src="image.jpg"
alt="Description of image"
loading="lazy"
width="800"
height="600"
srcset="image-400.jpg 400w, image-800.jpg 800w"
sizes="(max-width: 600px) 400px, 800px">Video & Audio:
<video controls poster="thumbnail.jpg">
<source src="video.webm" type="video/webm">
<source src="video.mp4" type="video/mp4">
<track kind="captions" src="captions.vtt" srclang="en" label="English">
Your browser does not support video.
</video>VII. Meta Tags & SEO
Essential Meta Tags:
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Page description (150-160 chars)">
<meta name="robots" content="index, follow">
<!-- Open Graph -->
<meta property="og:title" content="Page Title">
<meta property="og:description" content="Description">
<meta property="og:image" content="https://example.com/image.jpg">
<meta property="og:url" content="https://example.com/page">
<meta property="og:type" content="website">
<!-- Twitter Card -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Page Title">
<meta name="twitter:description" content="Description">
<meta name="twitter:image" content="https://example.com/image.jpg">VIII. Links & Navigation
- Use descriptive link text (not "click here")
- Open external links in new tab with security attributes
- Use rel attributes appropriately
- Provide breadcrumb navigation
<!-- External link -->
<a href="https://example.com"
target="_blank"
rel="noopener noreferrer">
External Site
</a>
<!-- Download link -->
<a href="document.pdf" download>Download PDF</a>
<!-- Skip link -->
<a href="#main-content" class="skip-link">Skip to main content</a>IX. Tables
- Use tables for tabular data only
- Include proper headers with
<th>and scope attribute - Add caption for context
- Consider responsive strategies
<table>
<caption>Monthly Sales Data</caption>
<thead>
<tr>
<th scope="col">Month</th>
<th scope="col">Sales</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">January</th>
<td>$10,000</td>
</tr>
</tbody>
</table>X. Performance
- Minimize DOM depth
- Use lazy loading for images and iframes
- Preload critical resources
- Use async/defer for scripts
- Minimize inline styles and scripts
<!-- Preload critical resources -->
<link rel="preload" href="critical.css" as="style">
<link rel="preload" href="main.woff2" as="font" type="font/woff2" crossorigin>
<!-- Async/Defer scripts -->
<script src="analytics.js" async></script>
<script src="app.js" defer></script>
<!-- Lazy load iframe -->
<iframe src="video.html" loading="lazy"></iframe>XI. Common Patterns
Good Patterns:
- Semantic structure with proper heading hierarchy
- Accessible forms with labels
- Responsive images with srcset
- Progressive enhancement
- Clear document outline
Anti-Patterns to Avoid:
- Divs for everything (use semantic elements)
- Missing alt attributes
- Skipping heading levels
- Tables for layout
- Inline styles
- Missing form labels
- Auto-playing media
XII. Best Practices Checklist
Before submitting HTML code, verify:
- Valid HTML (use W3C validator)
- Proper document structure
- Semantic elements used appropriately
- All images have alt attributes
- Forms have associated labels
- Heading hierarchy is correct
- Links are descriptive
- Language attribute set on html element
- Meta viewport tag included
- No accessibility errors (use axe or similar)
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
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.

