some of what pages? if your talking about samples and scripts found on this and many other sites, generally these are left out for the sake of brevity. (is that a word?)
if you want your pages to validate, there going to need to be well formed, including doc type definitions and correct html tags.