How can glossary markup identify a term and its code?

The Citead team, updated

In short. Use termCode for a glossary term's code and inDefinedTermSet for the term set that contains it.

Definition: Schema.org's DefinedTerm type describes a word, name, acronym, phrase, or other item with a formal definition. Use termCode for an alphanumeric code and inDefinedTermSet for the glossary, classification scheme, or other term set that contains it.

Key facts

  • Schema.org defines DefinedTerm for terms used in category or subject classification, glossaries, dictionaries, product types, and creative work types.
  • The same definition says to use name for the term, description for its definition, and about for the subject matter.
  • Its property table allows inDefinedTermSet to contain either a DefinedTermSet or a URL, and describes it as the set that contains the term.
  • termCode has the expected type Text and identifies the DefinedTerm within a DefinedTermSet.
  • Google's structured data introduction says structured data is a standardized format for providing information about a page and classifying its content.

What does DefinedTerm describe?

Schema.org describes a DefinedTerm as a word, name, acronym, phrase, or similar item with a formal definition. Its description names glossaries and dictionaries as uses, alongside category or subject classification and product or creative work types. A glossary entry can therefore represent the term itself as a typed item, while its human-readable meaning belongs in description.

The core fields separate four pieces of information. name supplies the term being defined. description supplies its definition. about identifies the subject matter. termCode records an alphanumeric code when one has been allocated. These roles come from Schema.org's definition text, so a page can expose both the label readers see and the structured description associated with it.

How do termCode and inDefinedTermSet work together?

termCode is a Text value that identifies a DefinedTerm within a DefinedTermSet. inDefinedTermSet connects that term to the containing set and accepts either a DefinedTermSet value or a URL. The pair gives a consumer the code and the context in which Schema.org says that code identifies the term.

Schema.org's example uses a product and service classification set. It assigns the term code 261315XX to “Photovoltaic module” and identifies the United Nations Standard Products and Services Code with its URL:

{
    "@type": "DefinedTerm",
    "inDefinedTermSet": "https://www.unspsc.org/",
    "termCode": "261315XX",
    "name": "Photovoltaic module"
}

The separate DefinedTermSet definition describes a term set as a set of defined terms, including a glossary, dictionary, enumeration, category set, or classification scheme. Its hasDefinedTerm property describes a defined term contained in that set. A page can therefore model the term from the term's side with inDefinedTermSet, or model the set's contents with hasDefinedTerm.

How should the markup be published on a page?

Google describes structured data as in-page markup on the page to which the information applies. Its documentation says the markup describes that page's content and advises against adding structured data for information that is not visible to users. For a glossary page, the displayed term, definition, code, and term-set description should correspond to the values exposed in the markup.

The Schema.org page labels its example as JSON-LD in an HTML script tag. Google's documentation describes JSON-LD as JavaScript notation embedded in a script tag in the HTML head or body, and says Google recommends it in general when a site's setup allows it. A compact glossary item can follow the same vocabulary:

<script type="application/ld+json">
{
  "@context": "https://schema.org/",
  "@type": "DefinedTerm",
  "name": "Photovoltaic module",
  "description": "A photovoltaic module",
  "termCode": "261315XX",
  "inDefinedTermSet": "https://www.unspsc.org/"
}
</script>

The description sentence in this compact version is a placeholder for the definition that the page actually displays. The source example supplies the term name, code, and set URL; the DefinedTerm definition supplies description as the property for the term's definition.

Google states that most Search structured data uses Schema.org vocabulary, while Google Search Central documentation is definitive for Google Search behavior. Schema.org contains more attributes and objects that may be useful to other search engines, services, tools, and platforms. A valid DefinedTerm therefore describes the vocabulary relationship, while Google's feature documentation determines whether Google Search uses a particular property for a Search feature.

Google's Rich Results Test documentation describes it as a tool for validating structured data and, in some cases, previewing a Google Search feature. The same page says to use it during development and to check complete and accurate properties against the relevant feature documentation.

FAQ

Should the code go in name?

No. Put the human-readable term in name and the identifying code in termCode. Schema.org defines termCode as the code identifying the term within a term set.

Can inDefinedTermSet be a URL?

Yes. Schema.org lists DefinedTermSet or URL as the expected types for inDefinedTermSet, and describes the property as the set that contains the term.

Does Schema.org markup alone define Google's Search feature behavior?

Google says to use Google Search Central documentation as definitive for Google Search behavior. The Schema.org vocabulary can describe the term and its set, while feature eligibility depends on the relevant Google documentation.

Sources

  1. Schema.org, "DefinedTerm", 2026-09-16
  2. Schema.org, "DefinedTermSet", 2026-09-16
  3. Google Search Central, "Introduction to structured data markup in Google Search", 2025-12-10

Check how a page reads to answer engines. Open the GEO score analyzer

Test a page and see what to fix first

The analysis usually takes less than 10 seconds and needs no account.

400,000+ pages scored in the public benchmark