HTML::Valid - tidy/validate HTML
use FindBin '$Bin'; use HTML::Valid; my $html = <<EOF; <ul> <li>Shape it up <li>Get straight <li>Go forward <li>Move ahead <li>Try to detect it <li>It's not too late EOF my $htv = HTML::Valid->new (); my ($output, $errors) = $htv->run ($html); print "$output\n"; print "$errors\n";
outputs
<!DOCTYPE html> <html> <head> <meta name="generator" content= "HTML Tidy for HTML5 for FreeBSD version 5.0.0"> <title></title> </head> <body> <ul> <li>Shape it up</li> <li>Get straight</li> <li>Go forward</li> <li>Move ahead</li> <li>Try to detect it</li> <li>It's not too late</li> </ul> </body> </html> line 1 column 1 - Warning: missing <!DOCTYPE> declaration line 1 column 1 - Warning: inserting implicit <body> line 2 column 1 - Info: missing optional end tag </li> line 3 column 1 - Info: missing optional end tag </li> line 4 column 1 - Info: missing optional end tag </li> line 5 column 1 - Info: missing optional end tag </li> line 6 column 1 - Info: missing optional end tag </li> line 1 column 1 - Warning: missing </ul> line 1 column 1 - Warning: inserting missing 'title' element Info: Document content looks like HTML5 Tidy found 4 warnings and 0 errors!
This documents HTML::Valid version 0.09 corresponding to git commit 0eff27f5da639787969d7ac7787f18df00b6753e released on Wed Jun 29 08:45:38 2022 +0900.
This Perl module is built on top of the "HTML Tidy" library version 5.8.0.
Validate/repair HTML. This module is based on "HTML Tidy", but not on the Perl module HTML::Tidy. However, you do not need to install HTML Tidy before installing this, because the library is contained in the distribution.
my $htv = HTML::Valid->new ();
Make a new HTML::Valid object.
It's also possible to supply options, as described in "OPTIONS":
$htv->new ( show_body_only => 1, alt_text => 'An image of a polar bear', );
my ($output, $errors) = $htv->run ($content);
Get the tidy HTML output and errors. This is basically the same thing as running the "tidy" utility with the given options.
$htv->set_filename ('file.html');
Set the file name for error reporting to file.html.
$htv->set_option ('omit-optional-tags', 1);
Most of the options of "HTML Tidy" are supported.
The following options can be set with "set_option". In this documentation they are given with a hyphen, but underscores can also be used. Options taking true or false values test for truth or falsehood using the standard Perl tests, so empty strings, the undefined value, or zero are all valid "false" values.
Please note the following documentation of the options is automatically extracted from the "HTML Tidy" documentation.
$htv->set_option ('accessibility-check', <value>);
Type: integer
Default: 0
This option specifies what level of accessibility checking, if any, that Tidy should perform.
Level 0 (Tidy Classic) is equivalent to Tidy Classic's accessibility checking.
0 (Tidy Classic)
For more information on Tidy's accessibility checking, visit Tidy's Accessibility Page.
$htv->set_option ('add-xml-decl', <value>);
Type: true or false
Default: false
This option specifies if Tidy should add the XML declaration when outputting XML or XHTML.
Note that if the input already includes an <?xml ... ?> declaration then this option will be ignored.
<?xml ... ?>
If the encoding for the output is different from ascii, one of the utf encodings or raw, the declaration is always added as required by the XML standard.
ascii
raw
$htv->set_option ('add-xml-space', <value>);
This option specifies if Tidy should add xml:space="preserve" to elements such as <pre>, <style> and <script> when generating XML.
xml:space="preserve"
<pre>
<style>
<script>
This is needed if the whitespace in such elements is to be parsed appropriately without having access to the DTD.
$htv->set_option ('alt-text', <value>);
Type: string
Default: <empty>
This option specifies the default alt= text Tidy uses for <img> attributes.
alt=
<img>
Use with care, as this feature suppresses further accessibility warnings.
$htv->set_option ('anchor-as-name', <value>);
Default: true
This option controls the deletion or addition of the name attribute in elements where it can serve as anchor.
name
If set to yes a name attribute, if not already existing, is added along an existing id attribute if the DTD allows it.
yes
id
If set to no any existing name attribute is removed if anid attribute exists or has been added.
no
$htv->set_option ('ascii-chars', <value>);
Can be used to modify behavior of the clean option when set to yes.
clean
If set to yes when clean, &emdash;, ”, and other named character entities are downgraded to their closest ASCII equivalents.
&emdash;
”
$htv->set_option ('assume-xml-procins', <value>);
This option specifies if Tidy should change the parsing of processing instructions to require ?> as the terminator rather than >.
?>
>
This option is automatically set if the input is in XML.
$htv->set_option ('bare', <value>);
This option specifies if Tidy should strip Microsoft specific HTML from Word 2000 documents, and output spaces rather than non-breaking spaces where they exist in the input.
$htv->set_option ('break-before-br', <value>);
This option specifies if Tidy should output a line break before each <br> element.
<br>
$htv->set_option ('clean', <value>);
This option specifies if Tidy should perform cleaning of some legacy presentational tags (currently <i>, <b>, <center> when enclosed within appropriate inline tags, and <font>). If set to yes then legacy tags will be replaced with CSS <style> tags and structural markup as appropriate.
<i>
<b>
<center>
<font>
$htv->set_option ('coerce-endtags', <value>);
This option specifies if Tidy should coerce a start tag into an end tag in cases where it looks like an end tag was probably intended; for example, given
<span>foo <b>bar<b> baz</span>
Tidy will output
<span>foo <b>bar</b> baz</span>
$htv->set_option ('css-prefix', <value>);
This option specifies the prefix that Tidy uses for styles rules.
By default, c will be used.
c
$htv->set_option ('decorate-inferred-ul', <value>);
This option specifies if Tidy should decorate inferred <ul> elements with some CSS markup to avoid indentation to the right.
<ul>
$htv->set_option ('doctype', <value>);
This option specifies the DOCTYPE declaration generated by Tidy.
If set to omit the output won't contain a DOCTYPE declaration. Note this this also implies numeric-entities is set to yes
omit
numeric-entities
If set to html5 the DOCTYPE is set to <!DOCTYPE html>.
html5
<!DOCTYPE html>
If set to auto (the default) Tidy will use an educated guess based upon the contents of the document.
auto
If set to strict, Tidy will set the DOCTYPE to the HTML4 or XHTML1 strict DTD.
strict
If set to loose, the DOCTYPE is set to the HTML4 or XHTML1 loose (transitional) DTD.
loose
Alternatively, you can supply a string for the formal public identifier (FPI).
For example:
doctype: "-//ACME//DTD HTML 3.14159//EN"
If you specify the FPI for an XHTML document, Tidy will set the system identifier to an empty string. For an HTML document, Tidy adds a system identifier only if one was already present in order to preserve the processing mode of some browsers. Tidy leaves the DOCTYPE for generic XML documents unchanged.
This option does not offer a validation of document conformance.
$htv->set_option ('drop-empty-elements', <value>);
This option specifies if Tidy should discard empty elements.
$htv->set_option ('drop-empty-paras', <value>);
This option specifies if Tidy should discard empty paragraphs.
$htv->set_option ('drop-font-tags', <value>);
Deprecated; do not use. This option is destructive to <font> tags, and it will be removed from future versions of Tidy. Use the clean option instead.
If you do set this option despite the warning it will perform as clean except styles will be inline instead of put into a CSS class. <font> tags will be dropped completely and their styles will not be preserved.
If both clean and this option are enabled, <font> tags will still be dropped completely, and other styles will be preserved in a CSS class instead of inline.
See clean for more information.
$htv->set_option ('drop-proprietary-attributes', <value>);
This option specifies if Tidy should strip out proprietary attributes, such as Microsoft data binding attributes.
$htv->set_option ('enclose-block-text', <value>);
This option specifies if Tidy should insert a <p> element to enclose any text it finds in any element that allows mixed content for HTML transitional but not HTML strict.
<p>
$htv->set_option ('enclose-text', <value>);
This option specifies if Tidy should enclose any text it finds in the body element within a <p> element.
This is useful when you want to take existing HTML and use it with a style sheet.
$htv->set_option ('escape-cdata', <value>);
This option specifies if Tidy should convert <![CDATA[]]> sections to normal text.
<![CDATA[]]>
$htv->set_option ('fix-backslash', <value>);
This option specifies if Tidy should replace backslash characters \ in URLs with forward slashes /.
\
/
$htv->set_option ('fix-bad-comments', <value>);
This option specifies if Tidy should replace unexpected hyphens with = characters when it comes across adjacent hyphens.
=
The default is yes.
This option is provided for users of Cold Fusion which uses the comment syntax: <!--- --->.
<!--- --->
$htv->set_option ('fix-uri', <value>);
This option specifies if Tidy should check attribute values that carry URIs for illegal characters and if such are found, escape them as HTML4 recommends.
$htv->set_option ('force-output', <value>);
This option specifies if Tidy should produce output even if errors are encountered.
Use this option with care; if Tidy reports an error, this means Tidy was not able to (or is not sure how to) fix the error, so the resulting output may not reflect your intention.
$htv->set_option ('gdoc', <value>);
This option specifies if Tidy should enable specific behavior for cleaning up HTML exported from Google Docs.
$htv->set_option ('gnu-emacs', <value>);
This option specifies if Tidy should change the format for reporting errors and warnings to a format that is more easily parsed by GNU Emacs.
$htv->set_option ('hide-comments', <value>);
This option specifies if Tidy should print out comments.
$htv->set_option ('hide-endtags', <value>);
This option is an alias for omit-optional-tags.
omit-optional-tags
$htv->set_option ('indent', <value>);
This option specifies if Tidy should indent block-level tags.
If set to auto Tidy will decide whether or not to indent the content of tags such as <title>, <h1>-<h6>, <li>, <td>, or <p> based on the content including a block-level element.
<title>
<h1>
<h6>
<li>
<td>
Setting indent to yes can expose layout bugs in some browsers.
indent
Use the option indent-spaces to control the number of spaces or tabs output per level of indent, and indent-with-tabs to specify whether spaces or tabs are used.
indent-spaces
indent-with-tabs
$htv->set_option ('indent-attributes', <value>);
This option specifies if Tidy should begin each attribute on a new line.
$htv->set_option ('indent-cdata', <value>);
This option specifies if Tidy should indent <![CDATA[]]> sections.
$htv->set_option ('indent-spaces', <value>);
Default: 2
This option specifies the number of spaces or tabs that Tidy uses to indent content when indent is enabled.
Note that the default value for this option is dependent upon the value of indent-with-tabs (see also).
$htv->set_option ('indent-with-tabs', <value>);
This option specifies if Tidy should indent with tabs instead of spaces, assuming indent is yes.
Set it to yes to indent using tabs instead of the default spaces.
Use the option indent-spaces to control the number of tabs output per level of indent. Note that when indent-with-tabs is enabled the default value of indent-spaces is reset to 1.
1
Note tab-size controls converting input tabs to spaces. Set it to zero to retain input tabs.
tab-size
$htv->set_option ('input-xml', <value>);
This option specifies if Tidy should use the XML parser rather than the error correcting HTML parser.
$htv->set_option ('join-classes', <value>);
This option specifies if Tidy should combine class names to generate a single, new class name if multiple class assignments are detected on an element.
$htv->set_option ('join-styles', <value>);
This option specifies if Tidy should combine styles to generate a single, new style if multiple style values are detected on an element.
$htv->set_option ('language', <value>);
Currently not used, but this option specifies the language Tidy would use if it were properly localized. For example: en.
en
$htv->set_option ('literal-attributes', <value>);
This option specifies how Tidy deals with whitespace characters within attribute values.
If the value is no Tidy normalizes attribute values by replacing any newline or tab with a single space, and further by replacing any contiguous whitespace with a single space.
To force Tidy to preserve the original, literal values of all attributes and ensure that whitespace within attribute values is passed through unchanged, set this option to yes.
$htv->set_option ('logical-emphasis', <value>);
This option specifies if Tidy should replace any occurrence of <i> with <em> and any occurrence of <b> with <strong>. Any attributes are preserved unchanged.
<em>
<strong>
This option can be set independently of the clean option.
$htv->set_option ('lower-literals', <value>);
This option specifies if Tidy should convert the value of an attribute that takes a list of predefined values to lower case.
This is required for XHTML documents.
$htv->set_option ('markup', <value>);
This option specifies if Tidy should generate a pretty printed version of the markup. Note that Tidy won't generate a pretty printed version if it finds significant errors (see force-output).
force-output
$htv->set_option ('merge-divs', <value>);
This option can be used to modify the behavior of clean when set to yes.
This option specifies if Tidy should merge nested <div> such as <div><div>...</div></div>.
<div>
<div><div>...</div></div>
If set to auto the attributes of the inner <div> are moved to the outer one. Nested <div> with id attributes are not merged.
If set to yes the attributes of the inner <div> are discarded with the exception of class and style.
class
style
$htv->set_option ('merge-emphasis', <value>);
This option specifies if Tidy should merge nested <b> and <i> elements; for example, for the case
<b class="rtop-2">foo <b class="r2-2">bar</b> baz</b>,
<b class="rtop-2">foo <b class="r2-2">bar</b> baz</b>
Tidy will output <b class="rtop-2">foo bar baz</b>.
<b class="rtop-2">foo bar baz</b>
$htv->set_option ('merge-spans', <value>);
This option specifies if Tidy should merge nested <span> such as <span><span>...</span></span>.
<span>
<span><span>...</span></span>
The algorithm is identical to the one used by merge-divs.
merge-divs
$htv->set_option ('ncr', <value>);
This option specifies if Tidy should allow numeric character references.
$htv->set_option ('new-blocklevel-tags', <value>);
This option specifies new block-level tags. This option takes a space or comma separated list of tag names.
Unless you declare new tags, Tidy will refuse to generate a tidied file if the input includes previously unknown tags.
Note you can't change the content model for elements such as <table>, <ul>, <ol> and <dl>.
<table>
<ol>
<dl>
This option is ignored in XML mode.
$htv->set_option ('new-empty-tags', <value>);
This option specifies new empty inline tags. This option takes a space or comma separated list of tag names.
Remember to also declare empty tags as either inline or blocklevel.
$htv->set_option ('new-inline-tags', <value>);
This option specifies new non-empty inline tags. This option takes a space or comma separated list of tag names.
$htv->set_option ('new-pre-tags', <value>);
This option specifies new tags that are to be processed in exactly the same way as HTML's <pre> element. This option takes a space or comma separated list of tag names.
Note you cannot as yet add new CDATA elements.
$htv->set_option ('newline', <value>);
The default is appropriate to the current platform.
Genrally CRLF on PC-DOS, Windows and OS/2; CR on Classic Mac OS; and LF everywhere else (Linux, Mac OS X, and Unix).
$htv->set_option ('numeric-entities', <value>);
This option specifies if Tidy should output entities other than the built-in HTML entities (&, <, >, and ") in the numeric rather than the named entity form.
&
<
>
"
Only entities compatible with the DOCTYPE declaration generated are used.
Entities that can be represented in the output encoding are translated correspondingly.
$htv->set_option ('omit-optional-tags', <value>);
This option specifies if Tidy should omit optional start tags and end tags when generating output.
Setting this option causes all tags for the <html>, <head>, and <body> elements to be omitted from output, as well as such end tags as </p>, </li>, </dt>, </dd>, </option>, </tr>, </td>, and </th>.
<html>
<head>
<body>
</p>
</li>
</dt>
</dd>
</option>
</tr>
</td>
</th>
This option is ignored for XML output.
$htv->set_option ('output-html', <value>);
This option specifies if Tidy should generate pretty printed output, writing it as HTML.
$htv->set_option ('output-xhtml', <value>);
This option specifies if Tidy should generate pretty printed output, writing it as extensible HTML.
This option causes Tidy to set the DOCTYPE and default namespace as appropriate to XHTML, and will use the corrected value in output regardless of other sources.
For XHTML, entities can be written as named or numeric entities according to the setting of numeric-entities.
The original case of tags and attributes will be preserved, regardless of other options.
$htv->set_option ('output-xml', <value>);
This option specifies if Tidy should pretty print output, writing it as well-formed XML.
Any entities not defined in XML 1.0 will be written as numeric entities to allow them to be parsed by an XML parser.
$htv->set_option ('preserve-entities', <value>);
This option specifies if Tidy should preserve well-formed entities as found in the input.
$htv->set_option ('punctuation-wrap', <value>);
This option specifies if Tidy should line wrap after some Unicode or Chinese punctuation characters.
$htv->set_option ('quiet', <value>);
This option specifies if Tidy should output the summary of the numbers of errors and warnings, or the welcome or informational messages.
$htv->set_option ('quote-ampersand', <value>);
This option specifies if Tidy should output unadorned & characters as &.
&
$htv->set_option ('quote-marks', <value>);
This option specifies if Tidy should output " characters as " as is preferred by some editing environments.
"
The apostrophe character ' is written out as ' since many web browsers don't yet support '.
'
'
'
$htv->set_option ('quote-nbsp', <value>);
This option specifies if Tidy should output non-breaking space characters as entities, rather than as the Unicode character value 160 (decimal).
$htv->set_option ('repeated-attributes', <value>);
Default: 1
This option specifies if Tidy should keep the first or last attribute, if an attribute is repeated, e.g. has two align attributes.
align
$htv->set_option ('replace-color', <value>);
This option specifies if Tidy should replace numeric values in color attributes with HTML/XHTML color names where defined, e.g. replace #ffffff with white.
#ffffff
white
$htv->set_option ('show-body-only', <value>);
This option specifies if Tidy should print only the contents of the body tag as an HTML fragment.
If set to auto, this is performed only if the body tag has been inferred.
Useful for incorporating existing whole pages as a portion of another page.
This option has no effect if XML output is requested.
$htv->set_option ('show-errors', <value>);
Default: 6
This option specifies the number Tidy uses to determine if further errors should be shown. If set to 0, then no errors are shown.
0
$htv->set_option ('show-info', <value>);
This option specifies if Tidy should display info-level messages.
$htv->set_option ('show-warnings', <value>);
This option specifies if Tidy should suppress warnings. This can be useful when a few errors are hidden in a flurry of warnings.
$htv->set_option ('skip-nested', <value>);
This option specifies that Tidy should skip nested tags when parsing script and style data.
$htv->set_option ('slide-style', <value>);
This option has no function and is deprecated.
$htv->set_option ('sort-attributes', <value>);
This option specifies that Tidy should sort attributes within an element using the specified sort algorithm. If set to alpha, the algorithm is an ascending alphabetic sort.
alpha
$htv->set_option ('split', <value>);
$htv->set_option ('tab-size', <value>);
Default: 8
This option specifies the number of columns that Tidy uses between successive tab stops. It is used to map tabs to spaces when reading the input.
$htv->set_option ('tidy-mark', <value>);
This option specifies if Tidy should add a meta element to the document head to indicate that the document has been tidied.
meta
Tidy won't add a meta element if one is already present.
$htv->set_option ('uppercase-attributes', <value>);
This option specifies if Tidy should output attribute names in upper case.
The default is no, which results in lower case attribute names, except for XML input, where the original case is preserved.
$htv->set_option ('uppercase-tags', <value>);
This option specifies if Tidy should output tag names in upper case.
The default is no which results in lower case tag names, except for XML input where the original case is preserved.
$htv->set_option ('vertical-space', <value>);
This option specifies if Tidy should add some extra empty lines for readability.
The default is no.
If set to auto Tidy will eliminate nearly all newline characters.
$htv->set_option ('word-2000', <value>);
This option specifies if Tidy should go to great pains to strip out all the surplus stuff Microsoft Word 2000 inserts when you save Word documents as "Web pages". It doesn't handle embedded images or VML.
You should consider using Word's "Save As: Web Page, Filtered".
$htv->set_option ('wrap', <value>);
Default: 68
This option specifies the right margin Tidy uses for line wrapping.
Tidy tries to wrap lines so that they do not exceed this length.
Set wrap to 0(zero) if you want to disable line wrapping.
wrap
$htv->set_option ('wrap-asp', <value>);
This option specifies if Tidy should line wrap text contained within ASP pseudo elements, which look like: <% ... %>.
<% ... %>
$htv->set_option ('wrap-attributes', <value>);
This option specifies if Tidy should line-wrap attribute values, meaning that if the value of an attribute causes a line to exceed the width specified by wrap, Tidy will add one or more line breaks to the value, causing it to be wrapped into multiple lines.
Note that this option can be set independently of wrap-script-literals. By default Tidy replaces any newline or tab with a single space and replaces any sequences of whitespace with a single space.
wrap-script-literals
To force Tidy to preserve the original, literal values of all attributes, and ensure that whitespace characters within attribute values are passed through unchanged, set literal-attributes to yes.
literal-attributes
$htv->set_option ('wrap-jste', <value>);
This option specifies if Tidy should line wrap text contained within JSTE pseudo elements, which look like: <# ... #>.
<# ... #>
$htv->set_option ('wrap-php', <value>);
This option specifies if Tidy should line wrap text contained within PHP pseudo elements, which look like: <?php ... ?>.
<?php ... ?>
$htv->set_option ('wrap-script-literals', <value>);
This option specifies if Tidy should line wrap string literals that appear in script attributes.
Tidy wraps long script string literals by inserting a backslash character before the line break.
$htv->set_option ('wrap-sections', <value>);
This option specifies if Tidy should line wrap text contained within <![ ... ]> section tags.
<![ ... ]>
(The above options were generated from the documentation of HTML Tidy 5.1.25, so they may be outdated relative to the current version.)
There are two scripts, "htmlok", which runs on files or URLs and prints errors found to standard output, and "htmltidy", which runs on files or URLs and prints the reformatted HTML to standard output, with errors going to standard error. To use these scripts with URL validation, you need to have Data::Validate::URI and LWP::Simple installed.
This is a program and a library in C for improving HTML. It was originally written by Dave Raggett of the W3 Consortium. HTML::Valid is based on this project.
HTML Tidy web page
HTML Tidy git repository
Please note that this is not the Perl module HTML::Tidy by Andy Lester, although that module is also based on the above library.
This section gives links to the HTML standards which HTML::Valid supports.
HTML 2.0 was described in RFC ("Request For Comments") 1866, a standard of the Internet Engineering Task Force. See http://www.ietf.org/rfc/rfc1866.txt.
This was described in the HTML 3.2 Reference Specification. See http://www.w3.org/TR/REC-html32.
This was described in the HTML 4.01 Specification. See http://www.w3.org/TR/html401/.
http://diveintohtml5.info/.
This isn't a standards document, but "Dive into HTML 5" may be good background reading before trying to read the standards documents.
This is at https://developers.whatwg.org/. It says
This specification is intended for authors of documents and scripts that use the features defined in this specification.
This is at http://www.w3.org/TR/html5/. It's the W3 consortium's version of the WHATWG documents.
You may like to try these validators for checking your HTML.
Commercial HTML validator.
W3 Consortium validator.
New W3 Consortium validator.
[⭐ Author: RRWO; Date: 2020-07-31; Version: v0.3.2]
2020-07-31
v0.3.2
[⭐ Author: PETDANCE; Date: 2018-06-22; Version: 2.32]
2018-06-22
2.32
[Author: GRANDPA; Date: 2019-08-09; Version: 1.0004]
2019-08-09
1.0004
[⭐ Author: SHLOMIF; Date: 2020-10-16; Version: 0.010]
2020-10-16
0.010
[⭐ Author: PETDANCE; Date: 2008-03-01; Version: 3.20]
2008-03-01
3.20
[⭐ Author: PETDANCE; Date: 2017-09-13; Version: 1.60]
2017-09-13
1.60
[⭐ Author: PETDANCE; Date: 2019-10-26; Version: 1.06]
2019-10-26
1.06
There is another module called HTML::Validator, but it can only be found on Backpan, dating from 2000. It uses an external XML validating tool. See http://backpan.perl.org/authors/id/S/SA/SAIT/.
From the documentation:
A small HTML validator: really all this does is make sure your tags are balanced, that your tables aren't missing TRs around the TDs, and that the local files that any relative URLs point to exist. There are much more fully-featured validators out there, but I haven't found them very useful: when all I want to know is "you left out a </UL>", they tend to spend their time whining at me about "where's your DTD?" and similar nonsense.
This is used to read a file of options
This module is built from "HTML Tidy" source code using a script which converts the HTML Tidy library into a single C file. This is available in the github repository as tools/make-c-file.pl, but is not in the CPAN distribution. This also includes extra C functions in extra.c into the library to access internals which are not part of the public interface. This is used for creating the machine-readable file of option documentation included above in "OPTIONS" and for creating the tables of tags and attributes in HTML::Valid::Tagset.
Ben Bullock <bkb@cpan.org>
HTML::Valid is based on HTML Tidy, which is under the following copyright:
Copyright (c) 1998-2016 World Wide Web Consortium (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University). All Rights Reserved.
Additional contributions (c) 2001-2016 University of Toronto, Terry Teague, @geoffmcl, HTACG, and others.
Dave Raggett <dsr@w3.org>
The contributing author(s) would like to thank all those who helped with testing, bug fixes and suggestions for improvements. This wouldn't have been possible without your help.
This software and documentation is provided "as is," and the copyright holders and contributing author(s) make no representations or warranties, express or implied, including but not limited to, warranties of merchantability or fitness for any particular purpose or that the use of the software or documentation will not infringe any third party patents, copyrights, trademarks or other rights.
The copyright holders and contributing author(s) will not be held liable for any direct, indirect, special or consequential damages arising out of any use of the software or documentation, even if advised of the possibility of such damage.
Permission is hereby granted to use, copy, modify, and distribute this source code, or portions hereof, documentation and executables, for any purpose, without fee, subject to the following restrictions:
1. The origin of this source code must not be misrepresented. 2. Altered versions must be plainly marked as such and must not be misrepresented as being the original source. 3. This Copyright notice may not be removed or altered from any source or altered source distribution.
The copyright holders and contributing author(s) specifically permit, without fee, and encourage the use of this source code as a component for supporting the Hypertext Markup Language in commercial products. If you use this source code in a product, acknowledgement is not required but would be appreciated.
The Perl parts of this distribution are copyright (C) 2015-2021 Ben Bullock and may be used under either the above licence terms, or the usual Perl conditions, either the GNU General Public Licence or the Perl Artistic Licence.
To install HTML::Valid, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTML::Valid
CPAN shell
perl -MCPAN -e shell install HTML::Valid
For more information on module installation, please visit the detailed CPAN module installation guide.