BBTidy is a BBEdit plugin designed to check and correct HTML and XML source.
It is based on the freely available "tidy" program by Dave Raggett.