Specifying a Document Type for a Snippet Set
You can specify a snippet set’s document type using the “Validate as:” popup button in the top section of the snippet set editor window.
A snippet set’s document type specification is more of a suggestion than a strict requirement, that exists mainly for edit-time validation convenience. You’re free to design a TypeMetal snippet set to be used with more than one HTML document type if you wish.
One way to do this is to stick to a common set of elements that are supported by all of the HTML document types you intend to use the snippet set with. For example: If you’ll be creating HTML files using both the HTML 5 and XHTML 1.0 Transitional document types, you might choose to avoid use of HTML-5-only elements such as
<section>. You can even formalize the omission of particular elements in the snippet set, if you wish. (It’s not strictly necessary where snippet completions are concerned, however, as TypeMetal automatically suppresses snippet completions that don’t validate against the active HTML file’s document type.)