and, albeit non-perlishly,
not as an alternative to the above suggestions, but as a step beyond, I would strongly that you test at least some of your html against the w3c validator
http://validator.w3.org/. If you use css (recommended), w3c also offers a reasonably trustworthy validator for that.
html is and css can be made sufficiently english-like that it's fairly easy to scan for correctness (certainly it's easier for me than debugging my sorry excuses for scripts). Your creepie-crawlies hide chiefly in the various (and disparate) non-standard performances by browsers. However, a little time invested (say, a few hours) in learning these will let you write html and css that perform reasonably well across (BIG caveat) reasonably current (say, v5 and up in the windoze world) browsers.