html-validator-cli: A command-line interface for

[ bsd3, library, program, web ] [ Propose Tags ]


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Versions [RSS],,
Change log
Dependencies aeson, ansi-terminal, base (>=4.7 && <5), bytestring, directory (>=1.2.5), doctest, filepath, hspec, html-validator-cli, http-conduit, text, utf8-string [details]
License BSD-3-Clause
Copyright IIJ Innovation Institute Inc.
Author Kenzo Yotsuya
Category Web
Home page
Bug tracker
Source repo head: git clone
Uploaded by KenzoYotsuya at 2018-10-16T11:24:20Z
Distributions NixOS:
Executables validatehtml
Downloads 1602 total (10 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2018-10-16 [all 1 reports]

Readme for html-validator-cli-

[back to package description]

html-validator-cli CircleCI

Command Line Interface for The W3C Markup Validation Service

$ cat /var/www/html/index.html
<!DOCTYPE html>
    <body>Hello, Validator!</body>

$ validatehtml /var/www/html/index.html
[ERROR] The character encoding was not declared. Proceeding using “windows-1252”.

[ERROR] Element “head” is missing a required instance of child element “title”.
From line 2, column 7; to line 3, column 10
ml> <html>     <body>Hello,

[WARNING] Consider adding a “lang” attribute to the “html” start tag to declare the language of this document.
From line 1, column 16; to line 2, column 6
TYPE html> <html>     <



Make sure you have a fresh version of Stack or Cabal installed.


stack update
stack install html-validator-cli


cabal update
cabal install html-validator-cli


Usage: validatehtml [-u URL] [-x DIR] FILE | DIR ...
  -s URL  --validator-url=URL  validation service url (default:
  -x DIR  --exclude=DIR        exclude files in DIR
  -1      --oneline            print each message on one line
  • FILE | DIR ...
    • Specify one or more HTML files to validate. When a directory is specified, all HTML files under that will be checked.
  • -s URL, --validator-url=URL
  • -x DIR, --exclude=DIR
    • Specify the folder name that you want to exclude from checking.
  • -1, --oneline
    • Specify it if you want to print the validation result in compact format.


Copyright (c) IIJ Innovation Institute Inc.

Licensed under The 3-Clause BSD License.