Use the command line (console) tool htmlval
for Mac/macOS to check HTML, CSS, and JSON documents on macOS, and try using it with your favorite Mac editor (see integration with Mac editors).
htmlval
is based on the core validation engine in CSS HTML Validator for Windows, which has been ported to macOS.
Note that some features like link checking, spell checking, PHP syntax checking, JavaScript checking, and some other features are currently not available in the macOS port. This is a command line (console) tool for macOS; there is no GUI like in the Windows version.
FREE limited version (arm64/M1/M2/Mx): htmlval
for Apple Mac (ARM) Free Limited (v23.04)
Download htmlval for Mac (ARM) FREE Limited Version • How to Install
FREE limited version (Intel/x86_64): htmlval
for Apple Mac (Intel) Free Limited (v23.04)
Download htmlval for Mac (Intel) 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).
For ARM Macs (i.e. Macs with M1 or M2 processors), download htmlval for Mac (ARM) FREE limited version or download htmlval for Mac (ARM) Paid Version.
For Intel Macs (Macs with Intel processors), download htmlval for Mac (Intel) FREE limited version or download htmlval for Mac (Intel) Paid Version.
After downloading, extract the files. The 'xxxxxx
' represents "trial" (for the trial 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-mac-arm64-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 htmlvalV240.cfg
is copied to /etc/htmlval. See the README
file if you want to do a manual install.
# cd htmlval # ./install-htmlval
or (when not root)
% cd htmlval % sudo ./install-htmlval
user@mac Downloads % tar -xvf htmlval-mac-arm64-free.tgz x htmlval/ x htmlval/README x htmlval/install-htmlval x htmlval/uninstall-htmlval x htmlval/htmlval x htmlval/htmlvalV230.cfg user@mac Downloads % cd htmlval user@mac htmlval % sudo ./install-htmlval Password: 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
user@mac Downloads % sudo ./htmlval/uninstall-htmlval
Password:
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 Apple Mac editors. This is a new list and we are adding editors as needed and requested. Is your favorite Apple Mac 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 Cmd+S) and save it as htmlval.sublime-build
in Sublime Text's User
folder (something like /Users/(username)/Library/Application Support/Sublime Text/Packages/User/htmlval.sublime-build
).
With the "htmlval" build system selected in Tools > Build System > htmlval, you can use Tools > Build (or Cmd+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 Code > 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 ]