#347: remove type attribute, and define DOCTYPE

Resolves #347.