.docname {Document types}
.include {docs}

The [`.doctype`](document-metadata.qd) function defines the type of document based on different use cases. Each document type offers its own set of features and behaviors tailored to specific output formats.

## Plain (`plain`)

A plain document has a linear layout with no page breaks, allowing content to flow continuously from top to bottom. Thanks to its responsive design, this type works well for websites and knowledge management documents, resembling the style of tools such as Notion or Obsidian.

The document consists of three main elements:
- A central content area
- Two side margin areas

!(1000)[Plain](document-types/plain.png)

### Margin content

[Page margin content](page-margin-content.qd) appears in a fixed position that remains visible as you scroll.

### Footnotes

[Footnotes](footnotes.qd) appear as sidenotes in this document type, positioned in the right margin area next to their first reference. On mobile devices, footnotes appear at the end of the page instead.

### PDF

When you export to PDF, the output artifact contains a single page that fits the entire content.

## Paged (`paged`)

A paged document follows a traditional layout with content divided into separate pages. Page breaks occur either [explicitly](page-break.qd) through manual insertion or implicitly when content exceeds the available space.

!(1000)[Paged](document-types/paged.png)

### Margin content

[Page margin content](page-margin-content.qd) appears on each page in a dedicated area.

### Footnotes

[Footnotes](footnotes.qd) appear at the bottom of the page where their first reference occurs, in a dedicated area.

## Slides (`slides`)

A slides document is designed for presentations, with a layout optimized for displaying content one slide at a time. Unless specified by the layout [theme](themes.qd), slides center their content horizontally. Slide breaks occur only through [explicit insertion](page-break.qd).

!(1000)[Slides](document-types/slides.png)

### Margin content

[Page margin content](page-margin-content.qd) appears on each slide without a dedicated area, which means it could potentially overlap the actual content.

### Footnotes

[Footnotes](footnotes.qd) appear at the bottom of the slide where their first reference occurs, without a dedicated area.

### PDF

When you export to PDF:
- Each slide becomes a separate page in the output artifact
- Each [fragment](slides-fragment.qd) state appears on its own page

## Docs (`docs`)

A docs document is designed for technical documentation, featuring a structured navigation-first layout with sidebars, a header with a search bar, and navigation buttons in the footer. This type is ideal for creating wikis, guides, and reference materials. The wiki you are currently reading is a docs document!

Docs documents leverage [subdocuments](subdocuments.qd), and include a lightweight, precise and client-side search functionality that allows finding content within the entire documentation set.

### Margin content

- `top*` margin content appears in the top header area
- `left*` margin content appears in the left sidebar area
- `right*` margin content appears in the right sidebar area
- `bottom*` margin content appears in the bottom footer area

### Footnotes

[Footnotes](footnotes.qd) appear at the bottom of the page, in a dedicated area.