CSS HTML Validator attempts to make validating documents with server side scripting meaningful. The way it does this is by trying to ignore such scripts.
For example, CSS HTML Validator will ignore <% ... %> (ASP) and <? ... ?> (PHP) blocks that are not in tags. You'll have to make sure that HTML Validator will ignore the ASP blocks by making sure that the option to ignore these blocks (in the Validator Engine Options) is checked. For PHP blocks, there is no option as it always ignores PHP blocks (but keep reading for an option to check PHP syntax using PHP's own syntax checking function).
When an ASP, PHP, or MIVA macro appears in a tag, CSS HTML Validator will change it to "!ASP!", "!PHP!", or "!MIVA!". For example, if you are using PHP and you use <input type=<? echo("checkbox name=checkbox1 value=red selected"); ?>>, then the validator engine will see <input type=!PHP!>. HTML Validator will automatically accept attributes and attribute values if they are "!ASP!", "!PHP!", or "!MIVA!", which the validator will see in this case.
The result of doing all of the above makes it possible for CSS HTML Validator to be useful when writing documents such as ASP and PHP documents. However, because documents containing server side scripting can be complex, there may be many situations where HTML Validator is not useful when validating raw documents containing ASP and PHP code. In this case, it is best to use HTML Validator to check only the final output of the scripts.
NOTE: If HTTP header data is available, then CSS HTML Validator assumes that the HTTP server has processed any scripting, so it does not look for scripting blocks to ignore (New v10.00133).
An easy way to check script output is to use the Batch Wizard and add URL targets. The Batch Wizard will then request a URL from a server and check the HTML document that is returned after the server processes any scripts in the document.
You can also open documents (URLs) from the web using the integrated editor. The source can then be checked simply by pressing F6.
With CSS HTML Validator Std/Pro, you can use the integrated web browser to browse the web inside CSS HTML Validator. The HTML source that is returned from the web server and shown in the integrated web browser can be automatically validated. This makes it easy to check the HTML produced by ASP, PHP, and similar pages.
A CSS HTML Validator Firefox Add-on (new window) may be available. Using CSS HTML Validator, Firefox, and this add-on makes checking the output of scripts very easy.
If checking PHP scripts, then CSS HTML Validator can optionally integrate with PHP's own syntax checking function to check PHP scripts for syntax problems. More information about PHP syntax checking is available.