Use the new command line (console) tool htmlval
to check HTML, CSS, and JSON documents on Linux, and try using it with your favorite Linux editor (see integration with Linux editors).
htmlval
is based on the core validation engine in CSS HTML Validator for Windows, which has been ported to Linux.
Note that some features like link checking, spell checking, PHP syntax checking, JavaScript checking, and some other features are currently not available in the Linux port. This is a command line tool for Linux; there is no GUI like in the Windows version.
FREE limited version: htmlval
for Linux Free Limited (v23.04)
Download htmlval for Linux FREE Limited Version • How to Install
The FREE limited version of htmlval
is fully functional (with no time limit) except for the maximum number of errors and warnings being locked (limited) to 10 each. The FREE limited version is also considered to be the trial version (but it has no time limit).
This is a new port of CSS HTML Validator which has undergone public BETA testing and has now been released. It is included at no additional cost to users licensed for CSS HTML Validator 2023 Pro and Enterprise.
The program (htmlval
) is is a command line (console) tool that is expected to run on all or most 64-bit PC (AMD64) Linux systems, and has been successfully tested to run on various installations of (or derived from) Debian, Fedora, openSUSE, Slackware, Ubuntu, and Arch Linux.
[ To the top ]
To install, download htmlval for Linux FREE limited version or download htmlval for Linux Paid Version and then extract the files use tar
(see below). The 'xxxxxx
' represents "free" (for the free limited version) or the actual version number (for the paid version). After extraction you'll see a new htmlval directory with the needed files inside.
$ tar -xvf htmlval-linux-xxxxxx.tgz
Next, run the install script as root to copy the files into the proper location. htmlval
is copied to /usr/local/bin and htmlvalV230.cfg
is copied to /etc/htmlval. See the README
file if you want to do a manual install.
$ cd htmlval $ sudo ./install-htmlval
or (if already root)
# cd htmlval # ./install-htmlval
~$ tar -xvf htmlval-linux-free.tgz htmlval/ htmlval/uninstall-htmlval htmlval/README htmlval/htmlvalV230.cfg htmlval/htmlval htmlval/install-htmlval ~$ cd htmlval ~/htmlval$ sudo ./install-htmlval [sudo] password for username: Congratulations! htmlval is installed; use 'htmlval --help' for usage
[ To the top ]
The main documentation for htmlval
for Linux and htmlval
for Mac has been combined into a single htmlval Documentation page.
To uninstall, you can run the uninstall script as root to remove htmlval
and htmlvalVXXX.cfg
. Then you can manually delete any remaining htmlval
folder and htmlval*.tgz
file.
# ./htmlval/uninstall-htmlval
or (when not root)
$ sudo ./htmlval/uninstall-htmlval
~$ sudo ./htmlval/uninstall-htmlval
[sudo] password for username:
htmlval is uninstalled
[ To the top ]
If you like what you see and would like to buy a license and support continued development of htmlval
, then you can buy a license for CSS HTML Validator Pro for Windows. The Pro edition includes htmlval
(but not the Home edition).
You can also buy an htmlval-only license for $79 which includes only the command line (console) tool for both Linux and Mac. IMPORTANT: This htmlval-only license does not include the Windows GUI app.
Buy htmlval-only license ($79)
[ To the top ]
Below you will find helpful information on using htmlval
with various Linux editors. This is a new list and we are adding editors as needed and requested. Is your favorite Linux HTML editor missing or do you have a suggestion for an improvement? If so then please contact us or post in our forum and request that it be added.
Sublime Text: Go to Tools > Build System > New Build System. A default build document should open. Replace it with the following:
{ "shell_cmd": "htmlval -lhs --format \"%file%(%linenum%:%charnum%): %Type% - %msgtext%\" \"${file}\"", "file_regex": "^\\s*(\\S[^:]*)\\((\\d+):(\\d+)\\):\\s+([^\\n]+)" }
Go to File > Save (or press Ctrl+S) and save it as htmlval.sublime-build
in Sublime Text's User
folder (something like /home/(username)/.config/sublime-text/Packages/User/htmlval.sublime-build
).
With the "htmlval" build system selected in Tools > Build System > htmlval, you can use Tools > Build (or Ctrl+B) to perform a build, which will save the current document (which must have a filename) and then validate it with htmlval
. The validation messages should appear in Sublime Text's window. You can use F4 to scroll through the validator messages (Shift+F4 goes backwards).
Visual Studio Code: Close all projects and file. Go to Terminal > Configure Tasks. Choose Create tasks.json file from template then (if needed) choose Others. Copy and paste this htmlval task into the tasks.json
file and save it. When editing an HTML or CSS files, you can run this task by choosing Terminal > Run Task and the "htmlval" task. Use F8 when the editor has focus to go to the next problem (i.e. validator message).
OPTIONAL: To more easily run the "htmlval" task, go to File > Preferences > Keyboard Shortcuts and assign F6 as a keyboard shortcut to Tasks: Run Task (optionally setting 'When' to editorFocus by right-clicking and choosing Change When Expression). You can then press F6 and then ENTER to select the top task (assuming the top task is "htmlval").
[ To the top ]