Nobody is perfect. I wouldn't give this column to my editor without running it through a spellchecker first. You should do the same with your HTML. Even the simplest pages can fester with hidden errors in the code and content. Add to the mix scripting languages, embedded media, or links to other sites, and you're bound to make a mistake or two. But there are some easy ways to check your code. In fact, there are several HTML validation services on the Web - some of which have been around since the early days.
Most validation services compare a page's syntax with a standard document type description, or DTD, which traces its roots back to HTML's grounding in SGML. I won't go into the specifics here, but if you're really interested, there's plenty of background material at the W3 Consortium site.
One of the first such services, Weblint, was created as a Perl script that would run through an HTML document and report back the errors it found. You don't, however, need access to a Unix box to use the program. There are a number of form-based Weblint gateways that allow you to simply enter a URL and have the results displayed in your browser.
Weblint's author, Neil Bowers, has done a good job keeping the software up to date with the rapid evolution of both the official HTML spec and the rather varied interpretations shipped by both Netscape and Microsoft. The script will also make a few assumptions about your sense of style, informing you, for example, that it's "bad form to use 'here' as an anchor."
But beyond error-checking lies true page analysis. Take a look at the Doctor HTML resource page. Not only can you check your HTML syntax, but your page's spelling as well. I found the Image Analysis feature particularly useful: The script reports the image sizes as well as the estimated download time for an average user. Doctor HTML also checks out your links, makes sure your tables aren't a mess, and takes a look at your forms, too.
Once your pages are syntactically correct, you should make sure they work in all browsers, right? Yeah, well that would be fine if you actually had all those browsers on all those systems. Instead, check out Bobby, another Web-based resource that will find HTML compatibility problems that prevent pages from displaying correctly on different Web browsers. Type in a URL, select which browser you want to check it against, and off you go. Conversely, if you're simply interested in whether your pages are accessible through text-only browsers such as Lynx, try Lynx View. Again, enter a URL and you'll get back a page that shows you a simple text version.
If you maintain any number of Web pages, you can't possibly assume they're all perfect. Now, you have no excuse. Go forth and validate.