It's fortunate that as developers and designers become more aware of web standards and using HTML and XHTML in their specified forms, many of these problems are being repaired. But we are still in transitional times, and confusion in terms of what's allowed or not allowed in a given document still reigns.
To find redemption, simply repair your deadly sins. To find which of these sins you might be guilty of, try this novel idea on for size: Validate your documents. You can do this by using the W3C's validator, now improved with helpful information describing errors, reasons for errors, and how to repair errors. There are other validators as well; you can find them in many development tools.
My last bit of advice: If you're going to sin, know that you're sinning and know the reason why. Sometimes, it simply is necessary to use a non-standard approach to a specific problem. If you do find yourself in a situation like this, better to know the rules before you break them. That way, you can at least find solace in knowing you did your best.