Thank you, Vragabond.
After I added a title tag, my code past the validation.
With regarding to the doctype, as I said before, it was rendered by CGI::Pretty.pm. I have no control on it. And more importantly, the html page created by CGI::Pretty works <b>FINE</b> with IE, but not working with...