Schema.org Text Type, HTML Text Syntax, and Structured Data Strings
What Schema.org Text means on properties, where HTML allows text, and how Google documents text fields in JSON-LD markup.
This page centres on Schema.org usage of the Text value type: hundreds of vocabulary properties declare that values must be Text (a string-like literal in JSON-LD). It also covers HTML rules for text in markup, and Google Search notes on Text fields in rich-result types. It does not catalogue every property that accepts Text; the pattern is the same across name, headline, description, and similar term pages.
Schema.org Text: what “Text” means on a property page
Section titled “Schema.org Text: what “Text” means on a property page”On a Schema.org property definition, Text under “Values expected to be one of these types” means the value should be encoded as the Text data type—a human-readable string (or equivalent structured text object where another type is also allowed), not a nested Thing unless the property explicitly allows both.
The dedicated property text is itself typed as Text, like most string-holding terms in the cluster (for example email, telephone, sku). In JSON-LD you normally supply a JavaScript string:
"name": "Example Company","description": "Short plain-language summary."When only Text is listed, avoid passing a full JSON object where a string is expected unless your consumer’s documentation allows a more specific pattern (for example TextObject on description).
Text versus TextObject on description and similar fields
Section titled “Text versus TextObject on description and similar fields”description allows Text or TextObject. Use a plain string when one language and one block of copy is enough; use TextObject when you need structured or multilingual text. disambiguatingDescription and abstract accept Text only in this cluster’s excerpts—treat them as single-string fields unless Schema.org’s live page adds types.
HTML text syntax: where text is allowed and constrained
Section titled “HTML text syntax: where text is allowed and constrained”Markup authors often pair HTML content with Schema.org Text values (visible copy vs JSON-LD). The WHATWG HTML syntax rules define text in the parse model, not in Schema.org.
Text is allowed inside elements, attribute values, and comments. Extra constraints are placed on what is and what is not allowed in text based on where the text is to be put, as described in the other sections.
— WHATWG, The HTML syntax (see also the edition for web developers)
Text in element content becomes the DOM text users see (and what many structured-data examples mirror). Text in attribute values must follow attribute-specific rules (quoting, character references). Text in comments is not shown and must not be used as the sole carrier of critical Text fields for search features—put important strings in JSON-LD or visible content, then keep them consistent.
Properties that accept Text plus another type
Section titled “Properties that accept Text plus another type”Several properties in this cluster accept Text together with a more specific type. Prefer the specific type when you have structured data; use Text when you only have a literal string.
| Property | Also allowed (from cluster) | Practical choice |
|---|---|---|
| addressCountry, applicableCountry, returnPolicyCountry | Country |
ISO country code or name as Text if you are not linking a Country entity |
| applicationDeadline, jobStartDate | Date |
Text only when you cannot provide a machine-readable date; prefer Date |
| description | TextObject |
String vs structured/multilingual text |
| defaultValue, actionOption, option, requiredCollateral | Thing |
Text for labels or simple values; Thing for linked entities |
| operatingSystem | OperatingSystem |
Text for a name string; typed node when you model the OS |
| qualifications | Credential |
Text for free-form wording; Credential when credential structure exists |
| addressCountry | Country |
Same pattern as other country fields |
Using Text where a richer type is available usually still validates at the vocabulary level, but consumers may not extract the same detail.
Google Search: Text fields in forum and Q&A markup
Section titled “Google Search: Text fields in forum and Q&A markup”Google’s structured-data docs name Text for human-readable strings in specific types. Wording below is Google’s, not Schema.org’s property list text.
Discussion forum posting body and author name
Section titled “Discussion forum posting body and author name”For Discussion forum structured data, Google documents:
Text
The name of the author of the post.
(for author.name)
text
Text
Any text in the post, if applicable. This is very common, but in some cases can be left out if there is other media in the post.
(for post content on DiscussionForumPosting or SocialMediaPosting)
So Text here means the visible post copy and author name you want considered for the feature—not binary media. Omitting post text may be acceptable when media carries the post, but then do not expect text-based display from that field.
Q&A Page questions and comments
Section titled “Q&A Page questions and comments”For Q&A (QAPage) structured data, Google specifies Text for:
Text
The full text of the short form of the question. For example, “How many teaspoons in a cup?”.
(name)
Text
The full text of the long form of the question. For example, “I’m cooking, and I need to know how many teaspoons are in a cup. How many teaspoons are in a cup?”
(text on the question)
Text
The full text of the comment. If only a portion is marked up, Google might not be able to determine the best text to display.
(partial comment markup is a common failure mode: incomplete Text hurts display quality.)
Common conclusion: Schema.org marks many properties as Text; Google repeats Text where the feature needs full, human-readable strings. Supply complete question, answer, and comment text in the properties Google lists, aligned with on-page content.
Related “text” in other cluster docs (different meaning)
Section titled “Related “text” in other cluster docs (different meaning)”Some cluster hits use “text” outside Schema.org Text:
- Cloudflare Images draw overlays — rendering a text string on an image via
cf.imageor.text(), with font, color, and size limits. - Workers AI extraction models — extracted text includes source spans (start/end in the input).
- Cloudflare RealtimeKit
RtkText— a UI component, not a Schema.org type.
Do not confuse these APIs with Text in JSON-LD unless you are literally serializing the same string into both.
Common mistakes with Text values
Section titled “Common mistakes with Text values”- Wrong JSON shape: Nested objects on properties that allow only Text (see typical name / headline pages in the cluster).
- Truncated Q&A or forum text: Marking part of a comment or question when Google expects the full text.
- HTML vs JSON-LD mismatch: Visible HTML copy does not match Text in JSON-LD for headline, articleBody, or reviewBody.
- Using Text for countries or dates when addressCountry or applicationDeadline could use
CountryorDatefor clearer machine reading. - Relying on HTML comments for semantics instead of element text or structured data, contrary to HTML text placement rules.
How to check this on your site
Section titled “How to check this on your site”-
Pick a page with JSON-LD and open the Schema.org definitions for each string property you use (for example name, description, text) and confirm the value is Text or an allowed alternate type from the table above.
-
Compare visible HTML text in elements with the same strings in JSON-LD, using HTML syntax — text as the reference for where text may appear.
-
For Q&A or discussion markup, read Q&A (
QAPage) structured data and Discussion forum structured data and verify questions, answers, post body, and author Text fields contain the full strings Google describes. -
For properties that allow Text and another type, confirm you did not use a bare string where a
Date,Country, orThingwould match the data you actually have. -
You can check automatically in Answerwell (our tool): https://answerwell.org/workspace
Report an error or ask a question
Section titled “Report an error or ask a question”If something on this page is wrong or unclear, email yimasynthetic@gmail.com with the page URL and the exact sentence you are asking about, and we will correct or clarify it.