A template is a pre-existing form or pattern used to create something new. It can refer to a plan, model, or example that serves as a guide for making decisions or taking action. In computer programming and web design, it refers to a set of code or layout that defines the structure and content of a document or webpage.