๐ŸŽฏ

html

๐ŸŽฏSkill

from jaredlander/freshbooks-speed

VibeIndex|
What it does

Crafts semantic, accessible, and performant HTML pages using modern web standards and best practices.

html

Installation

npxRun with npx
npx html-validate src/**/*.html
๐Ÿ“– Extracted from docs: jaredlander/freshbooks-speed
0
-
Last UpdatedJan 15, 2026

Skill Details

SKILL.md

Write semantic, accessible, performant HTML with modern best practices. Use when asked to (1) create HTML pages or documents, (2) write semantic markup, (3) improve accessibility, (4) optimize HTML structure and performance, (5) implement forms, tables, or complex layouts, or when phrases like "HTML page", "web page", "markup", "semantic HTML", "accessibility" appear.

Overview

# Expert HTML Development

Write clean, semantic, accessible HTML that follows modern web standards and best practices.

MCP Integration - Context7

CRITICAL: Before writing or editing ANY HTML code, ALWAYS use the Context7 MCP server to check for relevant context.

Context7 provides access to a knowledge base that may contain:

  • Project-specific HTML patterns and conventions
  • Custom component libraries and templates
  • Style guide requirements
  • Accessibility standards for the project
  • Performance benchmarks and requirements
  • Team preferences and coding standards

Workflow:

  1. Before writing code: Query Context7 for relevant patterns, conventions, or examples
  2. During editing: Check Context7 for project-specific requirements that might affect your changes
  3. After writing: Verify your code aligns with any Context7 guidance

Use Context7 to search for topics like:

  • "HTML conventions"
  • "accessibility requirements"
  • "component templates"
  • "form patterns"
  • "performance standards"
  • Specific component or pattern names

Never skip the Context7 check - it ensures your HTML aligns with project standards and leverages existing patterns.

Core Principles

  1. Semantic first - Use elements for their intended meaning, not just appearance
  2. Accessibility by default - Every user deserves a great experience
  3. Progressive enhancement - Start with working HTML, layer on CSS/JS
  4. Performance matters - Optimize for speed and efficiency

Document Structure

Minimal Valid HTML5 Document

```html

Page Title - Site Name

```

Essential Meta Tags

```html

Specific, Descriptive Title | Brand

```

Semantic HTML Elements

Use the Right Element for the Job

```html

Article Title

Article content...

Article Title

Article content...

```

Sectioning Elements

| Element | Purpose | When to Use |

|---------|---------|-------------|

|

| Introductory content | Site/section header, not just "top of page" |

|

Accessibility Best Practices

ARIA Labels and Roles

```html

Email Address

```

Focus Management

```html

Custom Button

```

Alternative Text

```html

Bar chart showing 40% increase in sales from Q1 to Q2 2024

Network topology diagram

Detailed description of the network topology showing...

image

chart.png

```

ARIA Live Regions

```html

Loading...

Error: Please correct the form errors below.

```

Forms

Accessible Form Structure

```html

Personal Information

type="text"

id="name"

name="name"

required

aria-required="true"

aria-describedby="name-hint"

autocomplete="name"

>

Enter your first and last name

type="email"

id="email"

name="email"

required

aria-required="true"

autocomplete="email"

aria-invalid="false"

>

Preferred Contact Method

Email

Phone

Newsletter Subscriptions

Weekly Updates

Monthly Digest

0 / 500 characters

```

HTML5 Input Types

```html

```

Input Attributes for Better UX

```html

type="text"

name="username"

pattern="[a-zA-Z0-9_]{3,16}"

title="Username must be 3-16 characters, letters, numbers, and underscores only"

>

```

Tables

Accessible Data Tables

```html

Quarterly Sales Report for 2024
QuarterRevenueGrowth
Q1$1.2M+5%
Q2$1.5M+25%
Total$2.7M+15%

Course Schedule by Instructor and Day
InstructorMondayTuesdayWednesday
Dr. SmithBiology 101Biology 201Lab

```

Lists

Choosing the Right List Type

```html

  • Apples
  • Bananas
  • Oranges

  1. Preheat oven to 350ยฐF
  2. Mix dry ingredients
  3. Add wet ingredients
  4. Bake for 25 minutes

HTML

HyperText Markup Language, the standard markup language for web pages.

CSS

Cascading Style Sheets, used to style HTML elements.

  • Fruits

    • Tropical

      • Mango
      • Papaya

    • Citrus

      • Orange
      • Lemon

```

Performance Optimization

Image Optimization

```html

src="image-800w.jpg"

srcset="

image-400w.jpg 400w,

image-800w.jpg 800w,

image-1200w.jpg 1200w,

image-1600w.jpg 1600w

"

sizes="(max-width: 600px) 100vw, (max-width: 1200px) 50vw, 800px"

alt="Descriptive alt text"

loading="lazy"

decoding="async"

width="800"

height="600"

>

Descriptive alt text

Descriptive alt text

Alt text

Alt text

```

Resource Loading Strategies

```html

```

HTML Size Optimization

```html

Some text here

Some text here

Text

Text

```

Modern HTML Features

Details and Summary (Native Disclosure)

```html

Click to expand

Hidden content that can be toggled.

FAQ Question

Answer to the question.

```

Dialog Element (Native Modal)

```html

Dialog Title

Dialog content goes here.

```

Data Attributes

```html

Article Title

```

Template Element

```html

```

Content Embedding

Videos

```html

controls

width="640"

height="360"

poster="video-thumbnail.jpg"

preload="metadata"

>

kind="subtitles"

src="subtitles-en.vtt"

srclang="en"

label="English"

>

kind="captions"

src="captions-en.vtt"

srclang="en"

label="English CC"

default

>

Your browser doesn't support HTML5 video.

Download the video instead.

```

Audio

```html

Your browser doesn't support HTML5 audio.

Download the audio instead.

```

Iframes

```html

```

Validation and Quality

HTML Validation Checklist

  • [ ] Valid DOCTYPE declaration
  • [ ] Proper nesting (no overlapping tags)
  • [ ] All tags properly closed
  • [ ] Unique IDs on a page
  • [ ] Valid attributes for each element
  • [ ] Proper character encoding (UTF-8)
  • [ ] Alt text for all images (or empty alt for decorative)
  • [ ] Form labels associated with inputs
  • [ ] Heading hierarchy (no skipped levels)
  • [ ] Lang attribute on html tag
  • [ ] Valid HTML5 (use W3C validator)

Common HTML Mistakes to Avoid

```html

First paragraph



Second paragraph

First paragraph

Second paragraph

Content

Content

SidebarMain content

Main content

```

Security Best Practices

Input Sanitization Context

```html

{{userInput}}

<script>alert('safe')</script>

```

External Resources

```html

External Link

```

Progressive Enhancement

Build from HTML Up

```html

Expandable Section

Content revealed when expanded.

```

Tools and Workflow

Recommended Tools

| Purpose | Tool | Why |

|---------|------|-----|

| Validation | [W3C Validator](https://validator.w3.org/) | Check HTML validity |

| Accessibility | [axe DevTools](https://www.deque.com/axe/) | Find a11y issues |

| Performance | [Lighthouse](https://developers.google.com/web/tools/lighthouse) | Audit performance |

| HTML Minification | [html-minifier](https://github.com/kangax/html-minifier) | Reduce file size |

| Linting | [HTMLHint](https://htmlhint.com/) | Catch common mistakes |

HTML in Build Pipelines

```bash

# Validate HTML

npx html-validate src/*/.html

# Minify HTML

npx html-minifier --collapse-whitespace --remove-comments input.html -o output.html

# Check accessibility

npx pa11y http://localhost:3000

```

Quick Reference

Common Character Entities

| Character | Entity | Numeric |

|-----------|--------|---------|

| < | < | < |

| > | > | > |

| & | & | & |

| " | " | " |

| ' | ' | ' |

| ยฉ | © | © |

| ยฎ | ® | ® |

| โ„ข | | |

| non-breaking space |   |   |

| โ€” (em dash) | | |

| โ€“ (en dash) | | |

Global Attributes

Available on all HTML elements:

  • id - Unique identifier
  • class - CSS class names (space-separated)
  • style - Inline CSS styles
  • title - Advisory information (tooltip)
  • lang - Language of element content
  • dir - Text directionality (ltr, rtl, auto)
  • hidden - Hide element
  • tabindex - Tab order (-1, 0, positive numbers)
  • contenteditable - Make element editable
  • data-* - Custom data attributes
  • draggable - Enable drag and drop
  • spellcheck - Enable spell checking

Best Practices Summary

  1. Always check Context7 MCP before writing/editing code - Leverage project-specific patterns and requirements
  2. Always use semantic HTML - Choose elements based on meaning, not appearance
  3. Validate your HTML - Use W3C validator to catch errors
  4. Prioritize accessibility - Use ARIA attributes, alt text, and keyboard navigation
  5. Optimize for performance - Lazy load images, defer scripts, minimize HTML
  6. Use progressive enhancement - Start with HTML, layer on CSS and JavaScript
  7. Keep it simple - Don't over-engineer with unnecessary divs and complexity
  8. Test across browsers - Ensure compatibility with all major browsers
  9. Think mobile-first - Design for small screens, enhance for larger ones
  10. Use meaningful names - IDs and classes should describe purpose, not appearance
  11. Comment sparingly - Code should be self-documenting, comments for complex logic only