---
title: Text tags and HTML
description: Write the fields into the file. Docustay finds them and places them for you.
---

# Text tags and HTML

Write the fields into the file. Docustay finds them and places them for you.

## Tags in a Word or PDF file

Type a tag where a field belongs, for example {{Tenant signature;type=signature;role=Tenant}}. On upload Docustay reads the tags, places each field on the page where the tag was, and removes the tag text. A document with six tags becomes a document with six fields and the right roles.

## HTML in, template out

Send HTML with tags in it through the API and get a template back. Docustay renders the HTML to PDF with a real browser engine, so the result looks like your page.

## Payments in a tag

A payment field can be fixed, a value the signer types, a formula over other fields, a Stripe price, or a Stripe payment link. The amount is worked out on the server, never trusted from the browser.

## The same thing through the API

Everything a tag does can be done by sending field positions in JSON. Pick whichever your team finds easier to keep.

## A worked example

Here is a line in a Word file: Client signature {{Client signature;type=signature;role=Client}}. Upload the file and Docustay finds the tag, puts a signature box where it was, assigns it to the Client seat and removes the tag text from the page. The same file with six tags becomes a document with six fields.

A tag has a name, then settings separated by semicolons. Common settings are type (signature, text, date, checkbox, dropdown and others), role (who fills it in), label, and required.

## Why teams use tags

If your contracts are produced by software, tags let that software say where the fields go. No one opens an editor and drags boxes. It also makes documents easy to review: the field is written in the text where a person can see it.

## When tags and when the editor

Use the editor for a one-off. Use tags when documents are generated, when the same layout repeats, or when you want the fields to live in version control next to the text.

## Writing tags in a template you reuse

Tags work well in a template that is filled in by software. The file keeps its tags, each send fills the names and dates it knows, and the signer sees finished fields. A change to the wording is a change to one file, so the whole team sends the same version.

## Questions people ask

**What happens if a tag has a mistake?**

Docustay tells you which tag and what is wrong, in plain words, before anything is sent.

**Do tags work in PDF files too?**

Yes, as long as the tag is real text in the PDF, not a picture of text.

**Can a tag take a payment?**

Yes. A payment tag can be a fixed amount, a value typed by the signer, a formula over other fields, a Stripe price or a Stripe payment link.

## Keep reading

- [Templates](/product/templates)
- [Template library](/template-library)
- [The API](/developers/api)
- [Docs: templates and text tags](/docs/templates-and-text-tags)
