text (Toast XML Schema)

Specifies text used in the toast template.

Element hierarchy



<text id    = integer
      lang? = string 
      placement? = "attribution"
      hint-callScenarioCenterAlign? = boolean />


?   optional (zero or one)

Attributes and Elements


Attribute Description Data type Required Default value

The text element in the toast template that this text is intended for. If a template has only one text element, then this value is 1. The number of available text positions is based on the template definition.

integer Yes None

The target locale of the XML payload, specified as a BCP-47 language tags such as "en-US" or "fr-FR". The locale specified here overrides any other specified locale in binding or visual. If this value is a literal string, this attribute defaults to the user's UI language. If this value is a string reference, this attribute defaults to the locale chosen by Windows Runtime in resolving the string.

string No None

The placement of the text. Introduced in Anniversary Update. If you specify the value "attribution", the text is always displayed at the bottom of your notification, along with your app's identity or the notification's timestamp. On older versions of Windows that don't support attribution text, the text will simply be displayed as another text element (assuming you don't already have the maximum of three text elements). For more information, see Toast content.

string No None

Set to "true" to center the text for incoming call notifications. This value is only used for notifications with with a scenario value of "incomingCall"; otherwise, it is ignored. For more information, see Toast content.

boolean No None


Child Elements


Parent Elements

Parent Element Description

Specifies the toast template. Note that only one binding element can be included in a toast notification.



The body of the text element can be expressed in two ways:

  • As a literal string; for instance, <text id="1">Hello world!</text>.
  • As a string reference, using the "ms-resource" prefix; for instance, <text id="1"> ms-resource:hello</text>. When using the "ms-resource" prefix, the string identifier is referenced in the app's Resources.resjson (Windows app using JavaScript) or Resources.resw file (C#/C++).

For more information, see Globalizing your tile: localization, scaling, and accessibility.

See also