---
title: "Configure the PAGE in TypoScript"
manual: "TypoScript Explained"
version: "main"
permalink: "https://docs.typo3.org/permalink/t3tsref:guide-page@main"
source: "Guide/Page/Index.rst"
rendered: "2026-09-29T15:38:34+00:00"
---

# Configure the PAGE in TypoScript {#guide-page}

A TypoScript object of type [PAGE](https://docs.typo3.org/permalink/t3tsref:object-type-page@main) is needed
to display anything in the frontend of TYPO3.

The `PAGE` object is used to define a certain view of the content that was
entered in the backend.

To display an HTML representation of your content usually a Fluid template
is used to define the output of the HTML body while the `PAGE` object can
additionally define meta data for the HTML head or even the HTTP response.

By default the top level variable `page` is used to define the main
`PAGE` object. The following would display the empty skeleton of
an HTML page:

```typoscript
page = PAGE
```

If this line is missing, you get the error message
"No page configured for type=0.".

See also [Troubleshooting](https://docs.typo3.org/permalink/t3tsref:guide-troubleshooting@main).

**Overview**

-   [Displaying the page body with TypoScript](https://docs.typo3.org/permalink/t3tsref:displaying-the-page-body-with-typoscript@main)
-   [Loading CSS in TypoScript](https://docs.typo3.org/permalink/t3tsref:loading-css-in-typoscript@main)
-   [Loading JavaScript in TypoScript](https://docs.typo3.org/permalink/t3tsref:loading-javascript-in-typoscript@main)
-   [Favicon / shortcut icon definition in the TypoScript PAGE](https://docs.typo3.org/permalink/t3tsref:favicon-shortcut-icon-definition-in-the-typoscript-page@main)
-   [Tracking code: Add content to the end of your page](https://docs.typo3.org/permalink/t3tsref:tracking-code-add-content-to-the-end-of-your-page@main)

## Displaying the page body with TypoScript {#guide-page-body}

Numeral indexes on the `PAGE` object are used to output the actual content of
the page. Many integrators like to use the index 10.

As we already saw in section [First steps](https://docs.typo3.org/permalink/t3tsref:guide-first-steps@main), the following code outputs
"Hello World!":

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

```typoscript
page = PAGE
page {
  10 = TEXT
  10.value = Hello World!
}

```

In a more common use case you want to load the page content from a Fluid
template:

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

```typoscript
page = PAGE
page {
  10 = PAGEVIEW
  10 {
    paths {
      100 = EXT:my_sitepackage/Resources/Private/PageView/
    }
    dataProcessing {
      10 = page-content
    }
  }
}

```

You need at least a
[Minimal site package (see site package tutorial)](https://docs.typo3.org/m/typo3/tutorial-sitepackage/main/en-us/MinimalExample/Index.html#minimal-design)
to keep your templates in its private resources folder, for example
`EXT:my_sitepackage/Resources/Private/Templates`:

**EXT:my_sitepackage/Resources/Private/Templates/Pages/Default.fluid.html**

```html
<main>
  <p>Hello World!</p>
</main>

```

> [!NOTE]
> Learn more about building site packages (website themes) with TypoScript and
> Fluid templates in the [TYPO3 site package tutorial](https://docs.typo3.org/m/typo3/tutorial-sitepackage/main/en-us/Index.html#start).

## Loading CSS in TypoScript {#guide-page-loading-css}

You can write inline CSS using property
[cssInline.\[array\]](https://docs.typo3.org/permalink/t3tsref:confval-page-cssinline@main), or place your CSS file
in the public resources of your [Minimal site package](https://docs.typo3.org/m/typo3/tutorial-sitepackage/main/en-us/MinimalExample/Index.html#minimal-design):

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

```typoscript
page = PAGE
page {
  10 = TEXT
  10.value = <div class="myTodo">TODO: Add Fluid template </div>
  cssInline {
    10 = TEXT
    10.value (
      .myTodo {
        border: 2px solid #ee7600;
      }
    )
  }
  includeCSS {
    styles = EXT:my_sitepackage/Resources/Public/Css/styles.css
  }
}

```

## Loading JavaScript in TypoScript {#guide-page-loading-js}

You can write inline JavaScript using property
[jsFooterInline.\[array\]](https://docs.typo3.org/permalink/t3tsref:confval-page-jsfooterinline@main), or place your JavaScript file
in the public resources of your [Minimal site package](https://docs.typo3.org/m/typo3/tutorial-sitepackage/main/en-us/MinimalExample/Index.html#minimal-design):

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

```typoscript
page = PAGE
page {
  10 = TEXT
  10.value = <div class="myTodo">TODO: Add Fluid template </div>
  jsFooterInline {
    10 = TEXT
    10.value (
      alert("Hello World! ");
    )
  }
  includeJSFooter {
    main = EXT:my_sitepackage/Resources/Public/JavaScript/main.js
  }
}

```

> [!WARNING]
> If you are using inline JavaScript **never** pass any unescaped user input
> directly to the JavaScript.
>
> See also [Preventing Cross-site scripting (XSS)
> in TypoScript](https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/Security/GuidelinesIntegrators/Typoscript.html#security-typoscript-xss).

## Favicon / shortcut icon definition in the TypoScript PAGE {#guide-page-favicon}

Use property [shortcutIcon](https://docs.typo3.org/permalink/t3tsref:confval-page-shortcuticon@main) to define
the favicon:

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

```typoscript
page = PAGE
page {
  shortcutIcon = EXT:my_sitepackage/Ressources/Public/Icons/favicon.ico
  10 = TEXT
  10.value = TODO: Add Fluid template
}

```

You need to have a
[Minimal site package (see site package tutorial)](https://docs.typo3.org/m/typo3/tutorial-sitepackage/main/en-us/MinimalExample/Index.html#minimal-design)
and put the favicon file in the public resources folder of that site package.
If you followed the instruction from the site package tutorial that would be
path `EXT:my_sitepackage/Resources/Public/Icons`.

## Tracking code: Add content to the end of your page {#guide-page-tracking-code}

You can use the property [footerData.\[array\]](https://docs.typo3.org/permalink/t3tsref:confval-page-footerdata@main)
to enter some HTML code just before the closing `</body>` tag:

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

```typoscript
page = PAGE
page {
  10 = TEXT
  10.value = TODO: Add Fluid template
  footerData {
    10 = TEXT
    10.value (
      <!-- Enter some tracking code supplied by your provider -->
      <p>My tracking code</p>
    )
  }
}

```

> [!WARNING]
> The HTML is output directly. Never use any unescaped user input.
>
> See also [Preventing Cross-site scripting (XSS)
> in TypoScript](https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/Security/GuidelinesIntegrators/Typoscript.html#security-typoscript-xss).
