Getting your HTML code to validate is a good idea. Many standards advocates will tell you it's a absolute necessity. That might be a tad overstating things, but valid HTML will do you no harm, and validating is always a sound first step in the troubleshooting process.
CSE HTML validator Probably the professional's choice. The premium product costs quite a bit, but there is a free version as well, and this may suit many users' needs.
W3C online validator If these guys can't get it right, nobody can.