({{, (RefLink[TextElement, paclet:ref/TextElement])[text,props] 
represents an element of text with the specified properties.}, {, (RefLink[TextElement, paclet:ref/TextElement])[{(Subscript[elem, 1]),(Subscript[elem, 2]),…},props]
represents text formed from a sequence of elements.}, {, (RefLink[TextElement, paclet:ref/TextElement])[elems]
represents text where no properties are specified. }})

OpenersNotesSection(Spacer1)Details

(RefLink[TextElement, paclet:ref/TextElement]) is displayed in a notebook with property information shown underneath.

Properties are given in an association. The first value in the association is typically used in displaying the text element.

Typical keys in the props association include:

OpenersPrimaryExamplesSection(Spacer1)Examples  (2)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

(RefLink[TextElement, paclet:ref/TextElement]) for the noun "boat":

TextElement["boat",\[LeftAssociation]"GrammaticalUnit"->Entity["GrammaticalUnit","Noun"]\[RightAssociation]]

Create a list of (RefLink[TextElement, paclet:ref/TextElement]) representing words:

list = {
TextElement["The",\[LeftAssociation]"GrammaticalUnit"->Entity["GrammaticalUnit","Determiner"]\[RightAssociation]],
TextElement["House",\[LeftAssociation]"GrammaticalUnit"->Entity["GrammaticalUnit","Noun"]\[RightAssociation]]
}

Wrap this list as a "GrammaticalUnit" entity into another (RefLink[TextElement, paclet:ref/TextElement]):

TextElement[list,\[LeftAssociation]"GrammaticalUnit"->Entity["GrammaticalUnit","NounPhrase"]\[RightAssociation]]

Labeled

Use (RefLink[TextElement, paclet:ref/TextElement]) to represent the splitting of a text into characters, words or phrases:

TextElement[{"Eating","a","Margarita Pizza","with","a","plastic fork","."}]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[TextStructure, paclet:ref/TextStructure])  ▪  (RefLink[TextWords, paclet:ref/TextWords])  ▪  (RefLink[Labeled, paclet:ref/Labeled])}})}})