HTML Linter

I've always believed that HTML deserves the same rigor we give to JavaScript or CSS. But the tooling never quite matched up. ESLint transformed how we write JavaScript. Stylelint caught CSS issues before they shipped. Yet HTML—the skeleton everything hangs on—was often an afterthought.

The existing options felt incomplete. Browser validators focused on spec compliance, not best practices. IDE plugins worked in isolation without CI integration. And most tools couldn't handle the scale of large codebases or the nuance of custom rule definitions.

I also wanted an excuse to learn Rust properly. Building a parser seemed like the perfect project—memory safety mattered, performance was measurable, and the domain was familiar enough that I could focus on the language rather than the problem space.

HTML Linter is the result: a fast, configurable linter that runs anywhere. Define rules in JSON—check for missing alt attributes, enforce semantic elements, validate meta tags. Integrate it into your CI pipeline and catch structural issues before they reach production.

Details

Time
2024
Source
Tech Stack
  • Rust
  • HTML
  • JSON
Package
Documentation
Status
Active

Interactive Demo

Try the linter directly in your browser.

HTML Linter
1<div class="container">
2 <h1>Welcome!</h1>
3 <p>This is a sample<p>
4 <div>Nested content
5 <span>More text</div>
6 </span>
7 <img src="photo.jpg">
8</div>
⚠️Unclosed paragraph tagLine 3
⚠️Mismatched closing tagsLine 5
⚠️Missing closing tag for img elementLine 7