WWW Markup Validation is a specific case of “linting” where one runs a program to make sure bad idioms are not present in one’s code or markup. There are links to more linters and checkers below.
Also see "awesome linters" on GitHub which lists many good linters.