The document does indeed seem to be 4.01, but the validation errors are not weird at all. The doctype, http://www.w3.org/TR/html4/strict.dtd, states
<!ELEMENT FORM - - (%block;|SCRIPT)+ -(FORM) -- interactive form -->
whereas INPUT and BR are neither %block nor SCRIPT. So to make your form part correct, you change it into a structure looking like this
<form>
<!-- form must contain only block level elements -->
<div>
<!-- div can contain %inline -->
<input><br>
</div>
</form>
But, you also have a P element containing a FORM, while the DTD states
<!ELEMENT P - O (%inline;)* -- paragraph -->
Which means that the validator closes the paragraph in the same way as if you had written
</p><form>
And so far everything is correct since html 4.01 does not require you to explicitly close paragraphs. However, it does require you to have properly nested and matching tags. After the form, the parsers sees </p> which has no matching opening tag.
Replace the paragraph with something that does allow block level elements, such as <div>...</div>.
The media attribute determines when the CSS should be used: print, screen, all