Here are some excellent notes from the W3C:
Web pages should always include a DOCTYPE header with markup that conforms to the selected standard. Checking pages with a validation service is an excellent way to quickly verify your markup:
See also: Automatic HTML Validation