angular/aio/content/guide/template-overview.md
Virginia Dooley 6952a0a3e6 docs: add template overview doc (#45897)
Organize bottom list into cards.

PR Close #45897
2022-05-16 16:07:34 -07:00

3.2 KiB
Raw Blame History

Understanding templates

In Angular, a template is a blueprint for a fragment of a user interface (UI). Templates are written in HTML, and special syntax can be used within a template to build on many of Angular's features.

Prerequisites

Before learning template syntax, you should be familiar with the following:

Enhancing HTML

Angular extends the HTML syntax in your templates with additional functionality.
For example, Angulars data binding syntax helps to set Document Object Model (DOM) properties dynamically.

Almost all HTML syntax is valid template syntax. However, because an Angular template is only a fragment of the UI, it does not include elements such as <html>, <body>, or <base>.

To eliminate the risk of script injection attacks, Angular does not support the <script> element in templates. Angular ignores the <script> tag and outputs a warning to the browser console. For more information, see the Security page.

More on template syntax

You might also be interested in the following:

@reviewed 2022-05-11