.txt
, .md
, .rst
, .xml
, .html
, .json
, and more. However, HTML files are categorized slightly differently from other text file types. As a result, this documentation is divided into separate Text and HTML sections.
To learn how to import text and HTML see our documentation here.
The following types of labels can be applied to all text files, and at least one must be present in your project’s ontology to enable text labeling:
- Text Region: Object labels applied to a specific region within the text file.
- Classifications: Classification labels applied to the entire file.
Label Text and HTML Files
Text
Labeling Text Files
Labeling Text Files
Text
Text Region objects must be selected at the top of the editor. Only classifications are visible in the left side bar
- Highlight the text to label.
- Click a Text Region label type at the top of the Editor (or use the hotkey) to apply the label.

Labeling JSON Files
Labeling JSON Files
JSON
Text Region objects must be selected at the top of the editor. Only classifications are visible in the left side bar
- Highlight the text to label.
- Click a Text Region label type at the top of the Editor (or use the hotkey) to apply the label.

Labeling XML Files
Labeling XML Files
XML
Text Region objects must be selected at the top of the editor. Only classifications are visible in the left side bar
- Highlight the text to label.
- Click a Text Region label type at the top of the Editor (or use the hotkey) to apply the label.

HTML
Encord supports both raw HTML files and single-extension HTML files. The key difference is that single-extension HTML files include all the necessary elements to render the webpage, such as CSS and JavaScript.Labeling HTML - Single Extension
Labeling HTML - Single Extension
HTML - Single Extension
- Click a Text Region label type (or use the hotkey)
- Highlight the text you want to apply the label to.

Labeling HTML - Raw
Labeling HTML - Raw
HTML - Raw
- Click a Text Region label type (or use the hotkey)
- Highlight the text you want to apply the label to.

Using Relation Text Attributes - Text and HTML
Relation text attributes link an object to another object. In images or videos this could be linking a chicken’s body to its wing. In PDFs or text documents (text or HTML files) this could be linking words with measurements, or linking words with other words.Your Ontology must MUST contain text attributes with the Relation feature enabled if you want to use relation text attributes.

