# <mark>

Description

An empty element that places a marker into the text/tag sequence. The `<mark>` element can be used to reference a specific location in the text/tag sequence, and can additionally be used to insert a marker into an output stream for asynchronous notification. When processing a `<mark>` element, a synthesis processor must do one or both of the following:

- Inform the hosting environment with the value of the name attribute and with information allowing the platform to retrieve the corresponding position in the rendered output.
- When audio output of the SSML document reaches the mark, issue an event that includes the required name attribute of the element. The hosting environment defines the destination of the event.

The `<mark>` element does not affect the speech output process. For details on using `<mark>` at the VoiceXML level, click here.

Syntax

    <mark
        name="string"
        nameexpr="ECMAScript_Expression"/>

Attributes

Attribute | Description
name | The name of this mark. This name can be referenced at the VoiceXML level. Optional.
nameexpr | An ECMAScript expression to be evaluated and used as the `name` of the mark, as above. Optional.

Attribute Notes

- If `nameexpr` cannot be evaluated, an `error.semantic` event is thrown.

Parents

<foreach>, <prompt>

Children

None.

Limitations/Restrictions

- Currently, `<mark>` is not supported as a child of `<audio>`, `<enumerate>`, or any SSML tag.
- `<mark>` is only supported as a child of `<foreach>` when `<foreach>` is used within `<prompt>`.
- Refer to your vendor documentation for support details.

Example

To include speech markup tags, insert the SSML tags inside the `<prompt>` or `<foreach>` (within `<prompt>`) elements.

Note: Some versions of RealSpeak may only support numeric mark names (ex. "1234"). In that case, the following example would need to be modified. Please see vendor documentation for details.

    <prompt>
      <mark name="ad_start"/>
      Baseball scores brought to you by Elephant Peanuts.
      There's nothing like the taste of fresh roasted peanuts.
      Elephant Peanuts. Ask for them by name.
      <mark name="ad_end"/>
      <break time="500ms"/>
      Say the name of a team. For example, say Boston Red Sox.
    </prompt>