Suggest an editImprove this articleRefine the answer for “What does the template property do?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**`template`** in the `@Component` decorator sets the component's HTML template directly in the code, as a string. **Key point:** unlike `templateUrl`, where the template is stored in a separate file, `template` stores it inline directly in the code.Shown above the full answer for quick recall.Answer (EN)ImageThe `template` property in the `@Component` decorator sets the **component's HTML template directly in the code**, as a string. Example: ```typescript @Component({ selector: 'app-my-component', template: `<h1>{{ title }}</h1>` }) export class MyComponent { title = 'Hello, Angular!'; } ``` Angular uses this template to render the component's interface, binding it to the class's data and methods. > Unlike `templateUrl`, where the template is stored in a separate file, `template` stores it inline directly in the code.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.