Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>HTMLHintNew to Visual Studio Code? Get it now.
HTMLHint

HTMLHint

ctf0

|
50,608 installs
| (2) | Free
VS Code integration for HTMLHint - A Static Code Analysis Tool for HTML
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

vscode-htmlhint

based on https://github.com/microsoft/vscode-htmlhint + new features

New Feature

  • use external config file
  • make file types effectively configurable without limitations
  • slightly smaller size

Integrates the HTMLHint static analysis tool into Visual Studio Code.

hero

The extension will attempt to use the locally installed HTMLHint module, otherwise the extension will use the embedded version (current version 0.11.0).


Usage

The HTMLHint extension will run HTMLHint on your open HTML files and report the number of errors on the Status Bar with details in the Problems panel (View > Problems).

status-bar

Errors in HTML files are highlighted with squiggles and you can hover over the squiggles to see the error message.

hover

Note: HTMLHint will only analyze open HTML files and does not search for HTML files in your project folder.


Rules

The HTMLHint extension uses the default rules provided by HTMLHint, or if you prefer you can change them as below ex.

{
    "htmlhint.options": {
        "tagname-lowercase": false,
        "attr-lowercase": true,
        "attr-value-double-quotes":  true,
        "doctype-first": true
    }
}

.htmlhintrc

you can either

  • add a .htmlhintrc file in the root of your project folder.

  • or an external one using the htmlhint.optionsFile option, ex.

    "htmlhint.optionsFile": "/path/to/.htmlhintrc",
    

You can learn more about rule configuration at the HTMLHint Usage page.


Additional file types

if you'd like to use the HTMLHint extension with additional file types, then use htmlhint.documentSelector ex.

{
  "htmlhint.documentSelector": [
    "html",
    "php",
    "etc..."
  ]
}
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft