Welcome! You’re browsing the complete online Help for TypeMetal. The same content is available via TypeMetal’s “Help” menu.

TypeMetal User Guide

Specifying a Document Type for a Snippet Set

A snippet set specifies a primary HTML document type that it’s designed for. TypeMetal’s snippet set editor shows you the results of validating the set’s snippets against this document type.

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.

"Validate As" Popup Button
“Validate as…” Popup Menu

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.)

Next Steps

Learn how to specify the set of HTML elements a snippet set allows, or get started creating snippets.