summaryrefslogtreecommitdiffstats
path: root/htdocs/htmlchecker_api.html
diff options
context:
space:
mode:
Diffstat (limited to 'htdocs/htmlchecker_api.html')
-rw-r--r--htdocs/htmlchecker_api.html39
1 files changed, 39 insertions, 0 deletions
diff --git a/htdocs/htmlchecker_api.html b/htdocs/htmlchecker_api.html
new file mode 100644
index 0000000..9abe147
--- /dev/null
+++ b/htdocs/htmlchecker_api.html
@@ -0,0 +1,39 @@
+ <p>
+ For programmatic checking of modern HTML documents, you probably want
+ to instead use the API provided by the
+ <a href="https://validator.w3.org/nu/">W3C HTML Checker</a>. To do
+ that, call
+ <a href="https://validator.w3.org/nu/">https://validator.w3.org/nu/</a>
+ or the URL for another instance of the W3C HTML Checker, and consult
+ the following documentation:
+ </p>
+
+ <img src="/images/HTML5_Badge_128.png" alt="HTML5" class="html5_logo_128">
+ <ul>
+ <li><a href="https://github.com/validator/validator/wiki/Service:-Input:-GET">W3C HTML Checker GET interface</a></li>
+ <li><a href="https://github.com/validator/validator/wiki/Service:-Input:-POST-body">W3C HTML Checker POST interface</a></li>
+ <li><a href="https://github.com/validator/validator/wiki/Service:-Common-parameters">W3C HTML Checker parameters</a></li>
+ <li><a href="https://github.com/validator/validator/wiki/Output%3A-JSON">W3C HTML Checker out=json format</a></li>
+ <li><a href="https://github.com/validator/validator/wiki/Output:-XML">W3C HTML Checker out=xml format</a></li>
+ <li><a href="https://github.com/validator/validator/wiki/Output:-GNU">W3C HTML Checker out=gnu format</a></li>
+ </ul>
+ <p>
+ If for some reason rather than using the W3C HTML Checker API, you
+ want to use the W3C Markup Validator API, the simplest way to
+ do that is just to call <code>https://validator.w3.org/check?</code>
+ with a query string that includes the "<code>uri</code>" parameter
+ and the URL for the document to check, and with the
+ "<code>output=json</code>" parameter appended; for example:
+ <a href="https://validator.w3.org/check?uri=https://example.com/&amp;output=json">https://validator.w3.org/check?uri=https://example.com/&amp;output=json</a>.
+ The W3C Markup Validator will return the results as JSON, in
+ <a href="https://github.com/validator/validator/wiki/Output:-JSON">the same JSON format used by the W3C HTML Checker</a>.
+ You can specify other W3C Markup Validator options as additional query
+ parameters. The names of the query parameters are listed in the section
+ <a href="/docs/users.html#Options">Controlling the behavior of the W3C Markup Validator</a>,
+ in parentheses after the name of each option described.
+ All values for query parameters should be encoded in UTF-8 (before
+ percent-encoding them).
+ Separate the query parameters with either "<code>;</code>"
+ (semicolon) characters or with "<code>&amp;</code>" (ampersand)
+ characters.
+ </p>