# Building a template-driven form
This tutorial shows you how to create a template-driven form. The control elements in the form are bound to data properties that have input validation. The input validation helps maintain data integrity and styling to improve the user experience.
Template-driven forms use [two-way data binding](guide/architecture-components#data-binding "Intro to 2-way data binding") to update the data model in the component as changes are made in the template and vice versa.
Angular supports two design approaches for interactive forms.
You can build forms by using Angular [template syntax and directives](guide/glossary#template "Definition of template terms") to write templates with the form-specific directives.
This tutorial describes the directives and techniques to use when writing templates. You can also use a reactive or model-driven approach to build forms.
Template-driven forms are suitable for small or simple forms, while reactive forms are more scalable and suitable for complex forms.
For a comparison of the two approaches, see [Introduction to Forms](guide/forms-overview "Overview of Angular forms.")
You can build almost any kind of form with an Angular template —login forms, contact forms, and pretty much any business form.
You can lay out the controls creatively and bind them to the data in your object model.
You can specify validation rules and display validation errors, conditionally allow input from specific controls, trigger built-in visual feedback, and much more.
This tutorial shows you how to build a simplified form like the one from the [Tour of Heroes tutorial](tutorial/tour-of-heroes "Tour of Heroes") to illustrate the techniques.
Run or download the example application: .
## Objectives
This tutorial teaches you how to do the following:
* Build an Angular form with a component and template
* Use `ngModel` to create two-way data bindings for reading and writing input-control values
* Provide visual feedback using special CSS classes that track the state of the controls
* Display validation errors to users and conditionally allow input from form controls based on the form status
* Share information across HTML elements using [template reference variables](guide/template-reference-variables)
## Prerequisites
Before going further into template-driven forms, you should have a basic understanding of the following.
* [TypeScript](https://www.typescriptlang.org/ "The TypeScript language") and HTML5 programming
* Angular application-design fundamentals, as described in [Angular Concepts](guide/architecture "Introduction to Angular concepts")
* The basics of [Angular template syntax](guide/template-syntax "Template syntax guide")
* The form-design concepts that are presented in [Introduction to Forms](guide/forms-overview "Overview of Angular forms")
## Build a template-driven form
Template-driven forms rely on directives defined in the `FormsModule`.
| Directives | Details |
|:--- |:--- |
| `NgModel` | Reconciles value changes in the attached form element with changes in the data model, allowing you to respond to user input with input validation and error handling. |
| `NgForm` | Creates a top-level `FormGroup` instance and binds it to a `