Code validation

You can make sure that your code is correct by having it validated. There are various sites that will do this for free.

Why validate:

Many browsers will accept incorrect code, and guess a way to interpret it. Different browsers might reach different conclusions.

Moreover, at some point in the future it could happen that your code is not recognized anymore, or produces an outcome different from what you intended.
[On the other hand, browsers will - in general - understand correct code from a previous version.]

How to do it:

In general, you add at the beginning of your HTML file (before any HTML code) the lines
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
and then submit it to a validation site.

Here are the details.

Where to validate:

The Web Design Group's validator is at http://www.htmlhelp.com/tools/.
It can validate HTML and CSS1 (Cascading Style Sheets, version 1).
The CSS validator does not seem to like CSS included in an HTML file.
Help is also available.

The World Wide Web Consortium's validation site is http://validator.w3.org/.
This site offers validation of Cascading Style Sheets (CSS) as well.
To see what it does (and why), look at http://validator.w3.org/docs/help.html.