Fork me on GitHub

Check that your HTML code conforms to your coding standard

HTML_CodeSniffer is a client-side script that checks HTML source code and detects violations of a defined coding standard. HTML_CodeSniffer is written entirely in JavaScript, does not require any server-side processing and can be extended by developers to enforce custom coding standards by creating your own "sniffs".

To get you started, HTML_CodeSniffer comes with standards that enforce the three conformance levels of the Web Content Accessibility Guidelines (WCAG) 2.1, and the web-related components of the U.S. "Section 508" legislation. An auditor interface is provided by a bookmarklet to let you try out these accessibility checks on any web page.

List of standards and sniff coverage

WCAG 2.1/Section 508 Bookmarklet

Get the Accessibility Auditor Bookmarklet
Drag this link to your bookmarks bar to install
This bookmarklet has been designed to work with Google Chrome, Firefox, Safari and Internet Explorer

Run your code through the Sniffer

Run HTML_CodeSniffer over your own code to see how it works. The sniffer below will test your source code against your selected guideline.
Test results will be shown underneath the code block.

Paste your code here