Template
PronunciationTEM-playt
Definition
A template is an HTML file with placeholders and simple logic (loops, conditions) that the server fills with data to produce the final page.
Where you hear it
In server-rendered apps (Django, Flask, Rails), email generation, and when pages share a base layout.
Examples
The template loops over the payments and prints a row for each.
Every page extends the base template and fills in its block.
The template shows the price and the title of each product in the list.
Common mistake
Putting heavy logic or database queries in the template. Prepare the data in the view and keep the template about display.
Don't confuse with
A React component, which runs in the browser. A template is filled on the server before the page is sent.
Say it at work
- In a meeting or chat
Pass the list to the template as context.
- In an email or ticket
Escape user text in the template to avoid XSS.