# Writing templates
Most template languages ask you to learn a second syntax and sprinkle it through your HTML. Chameleon asks you to learn a handful of attributes. A template is always a well-formed document, and every loop and condition attaches to the element it controls. The result is markup you can read top to bottom and know exactly which element repeats, which disappears, and where the data lands. The full language reference lives at [chameleon.readthedocs.io](https://chameleon.readthedocs.io/); this page covers the parts the podcast site needs.
# TAL cheat sheet
``` xml
${title}
${user.name.title()} has ${len(items)} item(s)
Special offer!
Nothing here yet.
${item.name} - $${item.price}
| ${repeat.row.number}. ${row.title} |
[${item.name}](/items/${item.id})
${item.name}
placeholder shown in a browser preview
2024-01-01
Total: ${total}
```
Two habits pay off quickly. First, the placeholder text inside `tal:content` and `tal:replace` is what you see when you open the file in a browser without rendering it, so write something realistic there. Second, a literal `$` followed by `{` is written `$${...}`, as in the price example above.
# Escaping and `structure`
Everything inserted with `${...}`, `tal:content` or `tal:replace` is HTML-escaped. A guest named `