The Text tag shows text that can be labeled. Use to display any type of text on the labeling interface. You can use <Style>.htx-text{ white-space: pre-wrap; }</Style> to preserve all spaces in the text, otherwise spaces are trimmed when displayed and saved in the results. Every space in the text sample is counted when calculating result offsets, for example for NER labeling tasks.

Use with the following data types: text.


Param Type Default Description
name string Name of the element
value string Data field containing text or a UR
[valueType] url | text text Whether the text is stored directly in uploaded data or needs to be loaded from a URL
[saveTextResult] yes | no Whether to store labeled text along with the results. By default, doesn’t store text for valueType=url
[encoding] none | base64 | base64unicode How to decode values from encoded strings
[selectionEnabled] boolean true Enable or disable selection
[highlightColor] string Hex string with highlight color, if not provided uses the labels color
[showLabels] boolean Whether or not to show labels next to the region; unset (by default) — use editor settings; true/false — override settings
[granularity] symbol | word | sentence | paragraph Control region selection granularity

Sample Results JSON

Name Type Description
value Object
value.start string position of the start of the region in characters
value.end string position of the end of the region in characters
[value.text] string text content of the region, can be skipped

Example JSON

  "value": {
    "start": 2,
    "end": 81,
    "labels": ["Car"]


Labeling configuration to label text for NER tasks with a word-level granularity

  <Text name="text-1" value="$text" granularity="word" highlightColor="#ff0000" />
  <Labels name="ner" toName="text-1">
    <Label value="Person" />
    <Label value="Location" />


<Text name="p1">Some simple text with explanations</Text>
Try Starter Cloud for free Get Started