W3C HTML Validator
<img src=https://centerkey.com/graphics/center-key-logo.svg align=right width=200 alt=logo>
A package for testing HTML files or URLs against the W3C validator

Setup
Install
Install package for node:
$ npm install --save-dev w3c-html-validator
Import
Import into your application:
import { w3cHtmlValidator } from 'w3c-html-validator';
Validate
Call the validate() function:
const handleValidation = (error, info) => console.log(error || info);
const options = { file: 'https://pretty-print-json.js.org/', callback: handleValidation };
w3cHtmlValidator.validate(options);