html5-validator

1.2.1 • Public • Published

🛂 html5-validator

Dead-simple HTML5 validator using API Provided by W3.

Install

Using NPM

$ npm install html5-validator --save

Using Yarn

$ yarn add html5-validator

If you want to use CLI version, please install it globally.

# NPM 
$ npm install html5-validator -g
 
# Yarn 
$ yarn global add html5-validator

Usage

const validate = require('html5-validator')
 
// Check website
validate('https://www.w3.org').then(result => {
  console.log(result)
})
 
// Check File
validate('/path/to/file.html').then(result => {
  console.log(result)
})
 
// Check Source
const htmlSource = `<!DOCTYPE html><html><head><title>HTML5 Validator</title></head><body>Content goes here...</body></html>`
validate(htmlSource).then(result => {
  console.log(result)
})

CLI

 
html5v - W3 Validation Tool
 
  USAGE
 
    html5v    [source]
 
  ARGUMENTS
 
    [source]    Source could be url, filename, or quoted strings. optional 
 
  OPTIONS
 
    --skip-warning    Skip warning message. optional
 

License

MIT © oknoorap

/html5-validator/

    Package Sidebar

    Install

    npm i html5-validator

    Weekly Downloads

    16

    Version

    1.2.1

    License

    MIT

    Unpacked Size

    8.79 kB

    Total Files

    7

    Last publish

    Collaborators

    • oknoorap