A script that checks the conformance of HTML, CSS, and SVG files against W3C standards.
This fork enhances the original W3C-Validator by adding wildcard support, allowing you to validate multiple files at once.
Based on 1 API:
- Clone this repo
git clone https://github.com/uosyph/W3C-Validator.git- Run the validator command from within
Single file:
./w3c_validator.py index.html./w3c_validator.py css/styles.cssMultiple files:
./w3c_validator.py index.html article.html css/styles.css./w3c_validator.py *.html css/*.cssAll errors are printed in STDERR; Exit status = # of errors (0 on success)
- Error:
bad interpreter: No such file or directoryIf you get this error you might not have Python installed correctly; or the system PATH might not be updated to reflect the installed Python version.
Assuming that Python 3 is indeed installed, you can try to run it like so:
python3 w3c_validator.py index.html
- Error:
ModuleNotFoundError: No module named 'requests'If you get this error you do not have the modulerequestsinstalled in your system.
You can install requests using pip:
python3 -m pip install requests
If you don't have pip installed, you can get it here.