# htmlhint/htmlhint

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/htmlhint-htmlhint).**

3,321 stars · 435 forks · JavaScript · mit

## Links

- GitHub: https://github.com/htmlhint/HTMLHint
- Homepage: https://htmlhint.com
- awesome-repositories: https://awesome-repositories.com/repository/htmlhint-htmlhint.md

## Topics

`analysis` `code-analysis` `code-quality` `hint` `html` `htmlhint` `javascript`

## Description

HTMLHint is an HTML linter and static analysis tool designed to identify structural errors and syntax violations in source code. It functions as a configurable validator that scans local files and remote URLs to detect malformed tags, duplicate IDs, and document structure inconsistencies.

The tool serves as an accessibility auditor, verifying that web elements include necessary labels and alternative text for images. It further distinguishes itself by enforcing web document compliance, checking for the presence of doctypes, language attributes, and head metadata.

The project covers a broad range of quality assurance capabilities, including tag integrity verification, attribute standardization, and the restriction of inline styles. It also analyzes document formatting to detect mixed indentation and unescaped special characters.

Users can define and toggle specific syntax checks using configuration files, command line flags, or inline markers.

## Tags

### Testing & Quality Assurance

- [HTML Linters](https://awesome-repositories.com/f/testing-quality-assurance/html-linters.md) — Analyzes HTML source code to identify structural errors and syntax violations based on a configurable set of rules.
- [HTML Syntax Validations](https://awesome-repositories.com/f/testing-quality-assurance/html-syntax-validations.md) — Scans HTML files or URLs to find structural errors and syntax violations based on a set of rules.
- [Accessibility Auditing](https://awesome-repositories.com/f/testing-quality-assurance/accessibility-visual-testing/web-accessibility-standards/semantic-document-structures/accessibility-auditing.md) — Automatically verifies that images have alternative text and input elements have associated labels for accessibility. ([source](https://htmlhint.com/rules/))
- [HTML Tag Verifications](https://awesome-repositories.com/f/testing-quality-assurance/html-tag-verifications.md) — Ensures tags are properly closed and paired while identifying obsolete HTML elements. ([source](https://htmlhint.com/rules/))
- [Accessibility Auditors](https://awesome-repositories.com/f/testing-quality-assurance/software-testing/quality-compliance-auditing/accessibility-auditors.md) — Provides tools that programmatically inspect HTML content to verify compliance with web accessibility standards.
- [HTML Document Validations](https://awesome-repositories.com/f/testing-quality-assurance/html-document-validations.md) — Verifies the presence of doctypes, language attributes, and head metadata against industry web standards. ([source](https://htmlhint.com/rules/))
- [HTML ID Uniqueness Verifications](https://awesome-repositories.com/f/testing-quality-assurance/html-id-uniqueness-verifications.md) — Confirms that identification attributes are unique and avoids keywords that trigger content blocking software. ([source](https://htmlhint.com/rules/))
- [Inline Content Restrictions](https://awesome-repositories.com/f/testing-quality-assurance/inline-content-restrictions.md) — Identifies and blocks scripts and styles written directly inside markup to separate structure from behavior. ([source](https://htmlhint.com/rules/))

### Part of an Awesome List

- [Frontend Development](https://awesome-repositories.com/f/awesome-lists/devtools/frontend-development.md) — Automates the detection of obsolete tags and unclosed elements during the web development process.
- [Project Documentation Examples](https://awesome-repositories.com/f/awesome-lists/devtools/project-documentation-examples.md) — Features a centered hero animation and concise tagline.

### Development Tools & Productivity

- [HTML Validators](https://awesome-repositories.com/f/development-tools-productivity/html-validators.md) — Provides a customizable syntax checker for enforcing indentation, attribute quoting, and document metadata standards.
- [HTML Static Analysis](https://awesome-repositories.com/f/development-tools-productivity/static-analysis-tools/html-static-analysis.md) — Scans files and URLs to detect malformed tags, duplicate IDs, and document structure inconsistencies.
- [Code Quality and Analysis](https://awesome-repositories.com/f/development-tools-productivity/code-quality-analysis.md) — Detects mixed indentation and unescaped special characters to ensure consistent code layout. ([source](https://htmlhint.com/rules/))
- [Linting Configurations](https://awesome-repositories.com/f/development-tools-productivity/linting-configurations.md) — Allows defining and managing syntax checks via configuration files, command line flags, or inline markers. ([source](https://cdn.jsdelivr.net/gh/htmlhint/htmlhint@main/README.md))

### Software Engineering & Architecture

- [Static Analysis Rule Engines](https://awesome-repositories.com/f/software-engineering-architecture/static-analysis-rule-engines.md) — Scans HTML source code against predefined logic checks to identify structural and syntax violations.
- [DOM Tree Construction](https://awesome-repositories.com/f/software-engineering-architecture/trees/syntax-tree-construction/dom-tree-construction.md) — Converts raw HTML strings into a hierarchical Document Object Model to analyze tag nesting and attribute integrity.
- [HTML Attribute Standards](https://awesome-repositories.com/f/software-engineering-architecture/coding-standards-enforcement/html-attribute-standards.md) — Enforces attribute quoting standards, lowercase lettering, and the removal of duplicate or unsafe characters. ([source](https://htmlhint.com/rules/))
- [Linting Rule Configurations](https://awesome-repositories.com/f/software-engineering-architecture/project-management-governance/project-governance/standards-rule-enforcement/configuration-driven-rules/linting-rule-configurations.md) — Provides a flexible system for toggling linting rules via configuration files and command line flags.
- [Syntax Inspection](https://awesome-repositories.com/f/software-engineering-architecture/syntax-tree-analysis/syntax-inspection.md) — Implements syntax inspection to identify structural errors and violations within HTML source files. ([source](https://htmlhint.com/))

### DevOps & Infrastructure

- [HTML Formatting](https://awesome-repositories.com/f/devops-infrastructure/configuration-management/application-settings-management/formatting-rule-definitions/html-formatting.md) — Enforces consistent indentation, attribute quoting, and naming conventions to maintain readable markup.

### Web Development

- [Web Standards](https://awesome-repositories.com/f/web-development/web-standards.md) — Verifies that HTML pages include necessary doctypes, language attributes, and metadata to meet industry standards.
