certainly wasn't trying to belittle your knowledge of html. Just trying to help. I didn't see it in there so I assumed.... incorrectly.
can you speak in specific terms? What steps are you taking that's removing the doctype? 'validate' could mean tidy, internal validator, 3rd party validator, web validator...
in options>preferences>language options>html, do you have the correct doctype set there?
I'm not sure what you mean when you say, "
By default, HTMLPad adds all the code you highlighted on clicking a 'new page'." I've never seen that behavior when creating a new page. I think I'm misunderstanding again.
If you use the w3c validator, (options>w3c validator) it should never actually touch the document. That's what I use and I've never had the problem. Again, it sounds to me like you're using Tidy and it's set up incorrectly but then again, I'm just guessing because you still haven't said.
Will