Validate!

To check whether your HTML tags are syntactically correct, you can use a validation service. This will compare your document against the SGML Document Type Definition (DTD) which defines how HTML should be written. A useful validation service can be found at the W3C. Some validation services only work if they can discover which DTD you're using--if you get an error message, try inserting a <!DOCTYPE> statement before the <HTML> tag, e.g.:

  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
					

or

  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

This is a statement that tells the validator (or any other program used to view or process your document) which standard (or DTD - Document Type Definition) you've used to write your page, and hence which tags are allowed in which order. The ones above are for the W3C's HTML 4.01 and XHTML 1.0 standards, but there are also browser-specific DTD's and other standards.