> ## Documentation Index
> Fetch the complete documentation index at: https://docs.autype.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Headings & Paragraphs

> Headings (h1–h6), paragraphs, and the text2 variant — with standard Markdown and extended HTML syntax for full styling control.

## Headings

Standard Markdown headings from `h1` to `h6`:

```markdown theme={null}
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
```

Headings support inline formatting:

```markdown theme={null}
# **Bold** Heading
## *Italic* Heading
### ~~Strikethrough~~ Heading
#### **Bold** and *Italic* Combined
```

### Heading anchors

Add an anchor ID to any heading with `{#id}` at the end. This allows cross-referencing from elsewhere in the document:

```markdown theme={null}
# Introduction {#intro}
## Methods {#methods}
### Data Analysis {#data-analysis}
```

Anchor IDs must start with a letter and can contain letters, numbers, underscores, and hyphens.

<Tip>
  See [References & Anchors](/markup-reference/references) for how to link to anchored headings.
</Tip>

### Extended HTML syntax

For full styling control, use HTML heading tags with attributes:

```html theme={null}
<h1 align="center">Centered Heading</h1>
<h2 align="center" color="#0066cc" fontSize="24">Styled Heading</h2>
<h3 fontFamily="Georgia" fontWeight="bold" spacing="10,20">Custom Font Heading</h3>
```

**Available attributes:**

| Attribute    | Values                               | Description                    |
| ------------ | ------------------------------------ | ------------------------------ |
| `align`      | `left`, `center`, `right`, `justify` | Text alignment                 |
| `color`      | CSS color (e.g., `#ff0000`, `red`)   | Text color                     |
| `fontSize`   | Number (points)                      | Font size                      |
| `fontFamily` | Font name (e.g., `Georgia`, `Arial`) | Font family                    |
| `fontWeight` | `normal`, `bold`                     | Font weight                    |
| `spacing`    | `before,after` (e.g., `10,20`)       | Spacing before/after in points |

***

## Paragraphs

Standard Markdown paragraphs — just write text:

```markdown theme={null}
This is a regular paragraph. It can span
multiple lines and will be joined together.

A blank line starts a new paragraph.
```

Consecutive lines without a blank line between them are merged into a single paragraph.

### Text2 style (secondary paragraph)

Use the pipe prefix `| ` to apply the `text2` style — a secondary paragraph style defined in your document defaults (e.g., smaller font, different color):

```markdown theme={null}
| This is a text2 paragraph.
| Multiple lines can use text2 style.
| Each line starts with pipe and space.
```

<Note>
  The `text2` style uses the styling defined in your document's `defaults.styles.text2` configuration. This is useful for subtitles, captions, or secondary information.
</Note>

<Warning>
  Lines starting with `|` that also **end** with `|` are parsed as table rows, not text2 paragraphs.
</Warning>

### Extended HTML syntax

For full styling control, use HTML paragraph tags:

```html theme={null}
<p align="justify">This paragraph is justified.</p>
<p align="center" color="#666666" fontSize="12">Styled paragraph text.</p>
<p fontFamily="Arial" spacing="5,10">Custom styled paragraph.</p>
```

Multi-line HTML paragraphs are also supported:

```html theme={null}
<p align="justify">
This is a longer paragraph that spans
multiple lines in the source.
</p>
```

**Available attributes:**

| Attribute    | Values                               | Description                    |
| ------------ | ------------------------------------ | ------------------------------ |
| `align`      | `left`, `center`, `right`, `justify` | Text alignment                 |
| `color`      | CSS color (e.g., `#ff0000`, `red`)   | Text color                     |
| `fontSize`   | Number (points)                      | Font size                      |
| `fontFamily` | Font name                            | Font family                    |
| `fontWeight` | `normal`, `bold`                     | Font weight                    |
| `fontStyle`  | `normal`, `italic`                   | Font style                     |
| `spacing`    | `before,after` (e.g., `5,10`)        | Spacing before/after in points |

<Tip>
  HTML syntax is optional. Use it only when you need styling that goes beyond what your document defaults provide. For most documents, standard Markdown headings and paragraphs are sufficient.
</Tip>
