An open API service indexing awesome lists of open source software.

https://github.com/oknoorap/html5-validator

:passport_control: W3 HTML5 Validator
https://github.com/oknoorap/html5-validator

cli html5 nodejs validator

Last synced: 4 months ago
JSON representation

:passport_control: W3 HTML5 Validator

Awesome Lists containing this project

README

          

# :passport_control: html5-validator
> Dead-simple HTML5 validator using [API](https://validator.w3.org/docs/api.html) Provided by W3.

## Install
Using NPM
```bash
$ npm install html5-validator --save
```

Using Yarn
```bash
$ yarn add html5-validator
```

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

```bash
# NPM
$ npm install html5-validator -g

# Yarn
$ yarn global add html5-validator
```

## Usage
```javascript
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 = `HTML5 ValidatorContent goes here...`
validate(htmlSource).then(result => {
console.log(result)
})
```

## CLI
```bash

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](https://github.com/oknoorap)