LinkChecker is a free, GPL licensed website validator. LinkChecker checks links in web documents or full websites. It runs on Python 3 systems, requiring Python 3.8 or later. The version in the pip repository may be old, to find out how to get the latest code, plus platform-specific information and other advice see doc/install.txt in the source code archive. If you do not want to install any additional libraries/dependencies you can use the Docker image which is published on GitHub...
Reptile is a web server made in Python. It supports server side scripting with "Embedded Python", PHP, and CGI scripts.
It has an integrated HTML/XMLvalidator that checks the pages before publication and others handy features.