---
title: "Wrap"
manual: "TypoScript Explained"
version: "main"
permalink: "https://docs.typo3.org/permalink/t3tsref:data-type-wrap@main"
source: "Functions/Wrap.rst"
rendered: "2026-09-26T09:44:57+00:00"
---

# Wrap {#data-type-wrap}

-   **wrap**

    -   *Syntax:* <...> | \</...>

    Used to wrap something. The vertical bar ("|") is the place, where
    your content will be inserted; the parts on the left and right of the
    vertical line are placed on the left and right side of the content.

    Spaces between the wrap-parts and the divider ("|") are trimmed off
    from each part of the wrap.

    If you want to use more sophisticated data functions, then you
    should use `stdWrap.dataWrap` instead of `wrap`.

    A `wrap` is applied as one of the last of properties
    a cObject.

    **Examples**

    This will cause the value to be wrapped in a p-tag coloring the
    value red:

    **EXT:site_package/Configuration/Sets/Main/setup.typoscript**

    ```typoscript
    page.10.wrap = <p class="bg-red"> | </p>
    ```
