w3cvalidate
w3c validator
Last updated 5 years ago by rstacruz .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install w3cvalidate 
SYNC missed versions from official npm registry.

validator

Command-line access to https://validator.w3.org/nu/

$ validate index.html

index.html: The Content-Type was text/html. Using the HTML parser.
index.html: Using the schema for HTML with SVG 1.1, MathML 3.0, RDFa 1.1, and ITS 2.0 support.
index.html:124:7: info: Consider using the h1 element as a top-level heading only (all h1 elements are treated as top-level headings by many screen readers and other tools).
index.html:133:3: info: Section lacks heading. Consider using h2-h6 elements to add identifying headings to all sections.

Programmatic access

via JavaScript:

var validate = require('w3cvalidate')

validate('<!doctype html>...')
.then(function (res) {
  res.errors === 0
  res.warnings === 0
  res.results === [
    {
      type: 'info',
      line: 2,
      column: 3,
      message: 'Section lacks heading. Consider using h2-h6...'
    }
  ]
})

Current Tags

  • 1.0.0                                ...           latest (5 years ago)

1 Versions

  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (4)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |