Red Wine in a GlassHow to Install CSS HTML Validator on Linux using WineCSS HTML Validator Logo
HOME Tutorials & Essays About
Tutorials & Essays About

July 20, 2021

CSS HTML Validator
CSS & HTML Validation Software for Linux

CSS HTML Validator

CSS HTML ValidatorNew Window Icon is a full-featured CSS and HTML editor with integrated syntax checking. Though it is a Windows app, in the past, it installed and ran flawlessly on Linux supported by Wine.

Unfortunately, recent changes to Wine resulted in the content of CSS HTML Validator's validation results panel being invisible. Syntax checking still works, but the diagnostic messages are not visible. This problem first appeared in Wine 5.18 but went away in a subsequent development version of Wine 6, only to return in a later development version of Wine 6. As of mid-July 2021, the validation results panel remains blank after a validation. I look forward to CSS HTML Validator returning to full functionality under Wine in the future.

Options for the installation

If you want to create a new Wine Prefix to host CSS HTML Validator, follow the directions as given, but there are other options.

Option 1 If you do not already have an initialized Wine Prefix (i.e., if you have never executed winecfg), you can skip the first two commands in the next section (mkdir and export) and start by executing the third command, wine winecfg. That will create and initialize the default Wine Prefix ~/.wine, and CSS HTML Validator will end up being installed there. If you do this, you will not need to worry about exporting Wine Prefixes.

Option 2 However, if you want to install CSS HTML Validator into an existing Wine Prefix, skip the first command (mkdir). Start by exporting the name of your intended Wine Prefix, as in the second command (export), but use the name of your Wine prefix in place of .wine-validator. Then, skip the winecfg command and continue with the cd ~/Downloads command (or whatever cd command will take you to where your CSS HTML Validator installer is located).

This document also assumes the wine prefix is .wine-validator. If your Wine prefix has a different name, substitute the name of your prefix for .wine-validator everywhere.

Enable Show Hidden Files

Before proceeding, you may want to enable the Show Hidden Files option in your file browser (Nautilus or other). If you follow the recommendation of creating a Wine prefix with a name that starts with a period, like ~/.wine-validator, or if you accept the default Wine prefix, which is ~/.wine, that folder will be hidden and therefore invisible unless Show Hidden Files is enabled. This will be important if you enable PHP syntax checking or sound for CSS HTML Validator.

Open a Terminal window

The next two commands do initial setup in advance of creating a Wine prefix. The name given here to the prefix is "wine-validator", but this can be replaced by any other name. For example, instead of ~/.wine-validator, you might prefer ~/.css-html.

$ mkdir -v ~/.wine-validator

$ export WINEPREFIX=~/.wine-validator

It is the next command, wine winecfg, that actually creates the Wine prefix by loading folder ~/.wine-validator with the magic that allows it to host running Windows apps. Be aware that winecfg generates lots of error messages, which you should simply ignore.

While winecfg is running, it may offer to install one or both of mono and geko. In that case, allow winecfg to do the downloads and installations. In fact, geko may ask to be downloaded and installed a second time. When this happens, it is probably because both Gecko 32-bit and Gecko 64-bit are needed, so allowing both to proceed is recommended.

When a dialog window opens and asks you to choose a Windows Version, the choice of Windows 10 is known to work with CSS HTML Validator. Other options in this dialog can be the defaults.

Eventually, winecfg will finish (messages from winecfg cease), but there may be no $ Terminal prompt. In that case, press the Enter key to display a Terminal prompt.

OK – go ahead and tell Wine to execute winecfg.

$ wine winecfg

The following cd command assumes that your CSS HTML Validator installation .exe file is in your ~/Downloads folder. If you have placed it somewhere else, such as on your Desktop, change the cd command to reference the actual location.

$ cd ~/Downloads

The name of the installation file in the following is taken to be installer.exe, but, in the command which installs CSS HTML Validator, you must replace this with the actual name of your installation file, which will be something like




Next is the command that does the actual installation of CSS HTML Validator. In this command, replace installer.exe as described above, and do not specify a path to the installer .exe file. cd must have been used to make the folder holding the installer .exe file the default. This is important.

When asked if a Desktop icon should be created, accept and choose either the current user option of the all users option. This icon will be needed.

It is possible that, at the end of the installation, Terminal does not display a $ prompt. In that case, press the Enter key.

$ wine installer.exe

Successful installation leaves a Launcher for CSS HTML Validator on your desktop or in your Applications or in both.

For some versions of Linux, no Launcher is left on the desktop, but you will find one – maybe two – launchers in Applications. If there are two launchers in Applications, one will open CSS HTML Validator, and the other will open the Batch Wizard in addition to CSS HTML Validator. If, when CSS HTML Validator opens, you see a Batch Wizard window, it can be closed, after which you are left with just CSS HTML Validator.

In case there is no CSS HTML Validator icon to be found anywhere, shut down and restart your computer. This happened once, with openSUSE Tumbleweed, and a re-boot was the fix.

You may now close the Terminal window.

$ exit

Before using the desktop launcher …

If there is a Launcher for CSS HTML Validator on your desktop, right-click it. If the window that opens includes an Allow Launching option, click it. If not, close the window and double-click the Launcher and, if prompted, click the Trust and Launch option. In the future, you will just double-click the Launcher to open CSS HTML Validator.

Register CSS HTML Validator (not needed for the trial version)

Open the email or file that contains your registration information and copy the contents to the clipboard.

It may be better not to close the source file after you copied the registration information. For some versions of Linux, CSS HTML Validator cannot access the copied information after the source file is closed.

If CSS HTML Validator is not running, open it by double-clicking its icon on the desktop or in Applications.

Then, navigate to Help > Register Program.

If the registration information in the clipboard is valid, CSS HTML Validator pre-fills the license information and you just need to select OK.

Enable Sound for Audible Notifications (optional)

Recall that you may need to enable the "Show Hidden Files" option in your file browser. If your Wine prefix folder name begins with a dot (as in ~/.wine-validator), it is a hidden folder, and you will not be able to use Files to navigate to it unless its "Show Hidden Files" option is enabled.

Before proceeding, you may need to configure and test your computer's sound, which can be done by opening "Sound" in your computer's "Settings".

MS Windows keeps its sound files in


so you can enable sound for CSS HTML Validator by creating a Media folder inside ~/.wine-validator/drive_c/windows to hold your own sound files. Here is the full path.


CSS HTML Validator uses two sounds, one when a validation finds errors or warnings, and another when a validation finds no errors or warnings. The default names for these .wav files are

Errors or warnings: Windows Critical Stop.wav
No errors or warnings: tada.wav

If files of those names are installed in ~/.wine-validator/drive_c/windows/Media/, close CSS HTML Validator (if it is open) and restart it. Beyond that, no other action may be required. However, if the sound files you install do not have the default names or are installed in a different folder, or if sound simply is not working, do the following.

Open CSS HTML Validator and press Ctrl+F4 to open the full Validator Engine options dialog. In case Ctrl+F4 does not work, the path through the menu is

Options > Validator Engine Options > Validator Engine Options [sic]

Scroll down the left column and click Sound.

In the panel on the right, both check boxes should be checked. You can enter the paths to your sound files, or you can navigate to the folder where you stored them by clicking the small folder icon to the right of a Play button. If your sound files are in the MS Windows default sound folder, the navigation path from within CSS HTML Validator is

My Computer > C: > windows > media

and the sound panel looks like this:

Image showing the CSS HTML Validator sound panel

You can verify that each sound works by clicking its Play button.

If sound still is not working, re-check your system's Settings > Sound where you can select the output to which sound should be directed and where you can test your system's sound to ensure it is working.

Enable PHP Syntax Checking (optional)

Recall that you may need to enable the "Show Hidden Files" option in your file browser. If your Wine prefix folder name begins with a dot (as in ~/.wine-validator), it is a hidden folder, and you will not be able to use Files to navigate to it unless the "Show Hidden Files" option is enabled.

Enabling PHP syntax checking in CSS HTML Validator requires several steps. (1) Download the latest version of Microsoft Visual C++ Redistributable for Visual Studio and install it to your CSS HTML Validator Wine prefix. (2) Choose, download, and install a version of PHP for Microsoft Windows in your Wine prefix. (3) Create and configure a php.ini file for running php.exe, the command line PHP executable. (4) Test php.exe to verify correct installation and execution. (5) Configure CSS HTML Validator to enable PHP syntax checking.

The end result is not a full PHP installation, just enough to allow the command line php.exe executable to work.

<Step 1> Microsoft Visual C++ Redistributable for Visual Studio

a. Browse to Window Icon

b. Scroll down and, below All Downloads, expand the Other Tools, Frameworks, and Redistributables item.

c. Look for Microsoft Visual C++ Redistributable for Visual Studio, and download both the x64 and the x86 versions.

Assuming the download was to ~/Downloads, the following commands will install Microsoft Visual C++ Redistributable for Visual Studio. (But verify the file names, as they may have changed since this was written.)

d. Open a terminal window and execute the following (after replacing ~/.wine-validator with your own Wine prefix).

$ cd ~/Downloads
$ export WINEPREFIX=~/.wine-validator
$ wine VC_redist.x64.exe
$ wine VC_redist.x86.exe

<Step 2>) PHP for Windows

At the time of this writing (January 6, 2021), PHP 8.0 is available, but validating with PHP 8.0 yields the error message 'C:\windows\system32\VCRUNTIME140.dll' 2.34 is not compatible with this PHP build linked with 14.28 in Unknown on line 0. Therefore, to enable PHP syntax checking, choose either PHP 7.3 or 7.4. (On the other hand, if you have the time, feel free to try using versions of PHP later than 7.4, as this may change in the future.)

a. Browse to Window Icon

and download a Zip file for a recent MS Windows compatible x64 Non Thread Safe version of PHP 7.3 or PHP 7.4.

b. Verify the download's SHA256 hash (optional but good to do).

c. Unzip the download into the Program Files folder inside the drive_c folder of your Wine prefix.

After the unzip, the new folder will have a name something like php-7.4.13-nts-Win32-vc15-x64.

d. Rename the new folder to PHP (all upper case).

<Step 3> Create and configure php.ini

a. To create the php.ini file, cd into the PHP folder and copy php.ini-production to php.ini. Assuming the WINEPREFIX variable is initialized, the following will do the cd and copy.

$ cd "$WINEPREFIX/drive_c/Program Files/PHP/"
$ cp -v php.ini-production php.ini

b. While still in the PHP folder, use your favorite command line text editor to open php.ini for editing. If nano is the editor,

$ nano php.ini

c. Scroll down or search to locate the definition of extension_dir. Edit the definition line so that it does not begin with a semi-colon and contains extension_dir = ext

d. Scroll down or search to locate log_errors = and edit the setting so that it does not begin with a semi-colon and contains log_errors = On

e. Scroll down or search to locate the setting for error_log. Edit the setting so that it does not begin with a semi-colon and contains error_log = syslog

f. Save your edits to php.ini and exit from the text editor. If using nano, this is done with Ctrl-O followed by Ctrl-X.

g. Verify that folder PHP contains subfolders ext and syslog. Probably ext exists but syslog does not. Use the following terminal commands as needed to ensure both are present.

$ mkdir -v etc
$ mkdir -v syslog

<Step 4> Test php.exe

All of the following terminal commands were executed from within the PHP folder.

a. Get the installed PHP version. The following shows the Terminal command followed by the output.

$ wine php.exe --version

PHP 7.4.13 (cli) (built: Nov 24 2020 12:43:30) ( NTS Visual C++ 2017 x64 )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies

b. Check an error-free PHP file for syntax errors. This uses the same command that CSS HTML Validator uses for PHP syntax checking.

$ wine php.exe -l -d display_errors=on /home/temp/TestFile-GOOD.php

No syntax errors detected in /home/temp/TestFile-GOOD.php

c. In the next test, the PHP file contains one syntax error.

$ wine php.exe -l -d display_errors=on /home/temp/TestFile-BAD.php

Parse error: syntax error, unexpected 'replace' (T_STRING) in /home/temp/TestFile-BAD.php on line 25
Errors parsing /home/temp/TestFile-BAD.php

d. Here is what happens when checking the version number with PHP 8.0.

$ wine php.exe --version

PHP Warning: 'C:\windows\system32\VCRUNTIME140.dll' 2.34 is not compatible with this PHP build linked with 14.28 in Unknown on line 0

e. You may close the Terminal window.

<Step 5> Configure CSS HTML Validator to do PHP syntax checking

a. Open CSS HTML Validator and press Ctrl+F4 to open the full Validator Engine options dialog. In case Ctrl+F4 does not work, the path through the menu is

Options > Validator Engine Options > Validator Engine Options [sic]

b. Scroll down the left column and click PHP Checker.

c. The Path to php.exe input field should contain C:\Program Files\PHP\php.exe. If it does not, enter it.

d. Put a check mark in the Enable PHP syntax messages box.

e. Click OK.

f. Set the Default Valuation Mode to Full. This is done by navigating the menu tree thusly.

Options > Validator Engine Options > Set Default Validation Mode > Full

g. Now, you can test PHP syntax checking by loading a web page that has some PHP code and deliberately inserting a syntax error. Click the Validate button in the toolbar (not the Validate menu option in the menu bar) to see what happens.

Image showing the location of the Validate command button

Facebook Logo   Twitter Logo  Reddit Logo   Quora Logo

Consider sharing your experience

Did you find this page helpful? Have constructive feedback? Wisdom to share?

Send email to Email Address

Privacy PolicyNew Window Icon

A.Z. (initials or other identifier) (date will be here)

… (your comment appears here) …

Graphic image of Athena pouring wine for Heracles, from 470 BC