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
- Host: GitHub
- URL: https://github.com/oknoorap/html5-validator
- Owner: oknoorap
- License: mit
- Created: 2017-06-13T13:02:38.000Z (about 9 years ago)
- Default Branch: develop
- Last Pushed: 2018-08-23T02:03:06.000Z (almost 8 years ago)
- Last Synced: 2025-12-25T04:46:19.227Z (6 months ago)
- Topics: cli, html5, nodejs, validator
- Language: JavaScript
- Homepage:
- Size: 67.4 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)