The <!DOCTYPE> declaration tells the web browser which (X)HTML version is being used on the page, and therefore how to interpret the various elements. Validators also rely on it to know which rules to enforce. It should always preceed the <html> tag.

The following code:

<html>            <!-- Non-Compliant -->
...
</html>

should be rewritten into:

<!DOCTYPE html>
<html>            <!-- Compliant -->
...
</html>