---
keywords: repr:text
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/dev/maps/ymapsml/doc/en/llms.txt


# repr:text

### Diagram

![](../_images/text.png)

### Description {#desc}

The template body.

This is an HTML code with the following inserts:

```
$[data_field_name|value_by_default]
```

When creating an HTML layout for a specific map object, such inserts are replaced with data from the object. For example, the template body might look like this:

```xml
<div><h3>$[name|no name specified]</h3><span>$[description|no description]</span></div>
```

When this template is applied, the `$[name|no name specified]` field will be replaced by the `name` field value of the object the template is used for.

If the `name` field is not set for an object, the default value will be substituted. Similarly for `$[description|no description]`.

When describing geographic objects with YMapsML, you can use such tags as [gml: name](https://yandex.ru/dev/maps/ymapsml/doc/en/ref/reference/gml-name.md), [gml: description](https://yandex.ru/dev/maps/ymapsml/doc/en/ref/reference/gml-description.md), and [gml: metaDataProperty](https://yandex.ru/dev/maps/ymapsml/doc/en/ref/reference/gml-metaDataProperty.md) for storage and subsequent display of data.

For security reasons, HTML markup can only be stored in the [gml: description](https://yandex.ru/dev/maps/ymapsml/doc/en/ref/reference/gml-description.md) tag. All other tags must contain text only, and HTML markup in them is shown on the screen.

### Contained by:

[repr:Template](https://yandex.ru/dev/maps/ymapsml/doc/en/ref/reference/representation-Template.md)

> ### repr:text
> 
> YMapsML document that describes an icon placemark template:
> 
> ```xml
> <repr:Template gml:id="myIconTemplate">
>     <repr:text>
>         <![CDATA[
>           <div style="font-size:15px;"><div><u>Name</u>: $[name]</div>
>           <div><u>Description</u>: $[description]</div> </div>
>           <div> <img src="http://www.irk.ru/img/site/gallery/75/c07c4446-d9d8-4c19-b595-e764145517b2_jpg_160x100000_q85.jpg"></div>
>         ]]>
>     </repr:text>
> </repr:Template>
> ```
> 
> Using this template, you can define a style:
> 
> ```xml
> <repr:Style gml:id="myStyle">
>    <repr:balloonContentStyle>
>       <repr:template>#myIconTemplate</repr:template>
>    </repr:balloonContentStyle>
>    <repr:iconStyle>
>       <repr:href>http://company.yandex.ru/i/ya.png</repr:href>
>       <repr:size x="56" y="56"/>
>    </repr:iconStyle>
> </repr:Style>
> ```
> 
> And apply it to a placemark:
> 
> ```xml
> <ymaps:GeoObject>
>    <ymaps:style>#myStyle</ymaps:style>
>    <gml:name>Baikal</gml:name>
>    <gml:description> The deepest lake on the planet Earth.<br/>The largest natural freshwater reservoir.</gml:description>
>    <gml:Point>
>       <gml:pos>107.7 53.08</gml:pos>
>    </gml:Point>
> </ymaps:GeoObject>
> ```

