Source code and package availabilityfor the W3C Markup Validator

The W3C Markup Validator provides Perl/CGI/SGML/XML/DTD-based
validation of a variety of document types.
SGML and DTDs are older technologies that never found wide use on
the Web, so for checking of HTML documents using modern
technologies, you probably want to instead use the
W3C HTML Checker.
To do that,

Installing from packages

Rather than trying to install and run an instance of the W3C from
the sources, it's much easier to install one of a variety of
pre-built packages. The sections below provide information about
packages available for various systems.

Fedora/Red Hat RPM package

Fedora RPM packages of the validator are included in Fedora.
The name of the validator package is w3c-markup-validator,
use the standard automated package management tools of the
distribution (such as yum) to install it along with its
dependencies.

For Red Hat Enterprise Linux and derivative distributions, the
w3c-markup-validator package is available in
EPEL.

openSUSE/SUSE Linux RPM package

openSUSE/SUSE Linux RPM packages of the validator are available,
courtesy of Sierk Bornemann, at software.openSUSE.org,
<http://software.opensuse.org/>.
Starting with openSUSE 10.3, the latest stable validator package and all its
dependencies are included in the official stable openSUSE distribution.
The name of the validator package is w3c-markup-validator,
use the standard automated package management tools of the
distribution (such as YaST, zypper, smart,
apt4rpm or yum) to install it along with its
dependencies.

Debian GNU/Linux package

Starting with Debian 3.1 ("Sarge"), the package and all its
dependencies are included in the official Debian distribution, and
can be installed by running the command apt-get install
w3c-markup-validator as root.