# First template

If you are accustomed to configuring page size and other document aspects (such as fonts) using PHP with other PDF renderers, you will appreciate the ability to do so using CSS and the official Print-CSS syntax with typeset.sh.

The following example shows how to create a simple A5 page using a Google font:

```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My first template</title>
<style>
    @import url('https://fonts.googleapis.com/css2?family=PT+Sans:ital,wght@0,400;0,700;1,400;1,700&display=swap');
    @page {
        size: A5;
        margin: 10mm;
    }
</style>
</head>
<body>
    Hello World
</body>
</html>
```

All layout-related configurations are done using CSS inside your document. The official CSS standard includes special properties and rules for printed and paged media such as PDF.

For more information on paged media in CSS, refer to the official W3.org reference at <https://www.w3.org/TR/2018/WD-css-page-3-20181018/>.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.typeset.sh/setup/first-template.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
