---
description: Template Introduction
---

# Templates

With the recent 5.0 release, users are encouraged to make their own add-ons through the template process. This allows you to make complex elements usable with only a single tag. Templates are added to HTML Widget in the same way add-ons are (see [add-ons](../add-ons/add-ons)) but without importing the file as you will create the template in the same file (if you choose, you can still make it as a module).

### Basic Add-on

```javascript
const tagName = {
  mapping: {},
  async render(template, styles, attrs, innerText) {
    await template(``);
  },
};
```

This piece of code declares the template substituted whenever the `tagName` tag is used.
