---
title: Headers
description: Structure pages with H2 and H3 headers that auto-populate the right-side table of contents and generate shareable anchor links.
---

> **For AI agents:** the complete documentation index is at [llms.txt](/docs/llms.txt). Append `.md` to any page URL for its markdown version.

Markdown headers (`##`, `###`) split your page into sections that readers can scan quickly. Jamdesk picks up H2 and H3 headers for the right-side table of contents and generates anchor links you can share directly.

## Basic Usage

Use standard Markdown headers to structure your content:

```markdown
## Section Title

Content goes here...

### Subsection

More detailed content...
```

Headers H2 and H3 appear in the right-side **Table of Contents**, helping readers navigate long pages.

## Anchor Links

Every header automatically generates an anchor ID from its text:

| Header                    | Generated Anchor       |
| ------------------------- | ---------------------- |
| `## Getting Started`      | `#getting-started`     |
| `## API Reference`        | `#api-reference`       |
| `### User Authentication` | `#user-authentication` |

### Sharing Header Links

Hover over any H2 or H3 header to reveal a **link icon**. This makes it easy to share direct links to specific sections:

- **Click the link icon** to copy the URL to your clipboard
- **Click the header text** to copy the URL and navigate to that section

The link icon appears in a small bordered box to the left of the header. When you copy a link, the icon briefly changes color to confirm the action.

<Note>
  On mobile devices, the link icon is hidden since there's no hover state.
  Headers still work normally for navigation.
</Note>

### Linking to Headers

Reference specific sections from other pages using the anchor:

```markdown
See the [headings section](/content/mdx-basics#headings) for details.
```

## Best Practices

<AccordionGroup>
  <Accordion title="Use a clear hierarchy" icon="sitemap" defaultOpen>
    Start with H2 for main sections, H3 for subsections:

    ```markdown
    ## Installation

    ### Prerequisites

    ### Quick Install

    ## Configuration

    ### Basic Options

    ### Advanced Options
    ```

    Avoid skipping levels (e.g., jumping from H2 to H4).

  </Accordion>

  <Accordion title="Keep headers concise" icon="text-width">
    Short headers are easier to scan:

    ```markdown
    {/* Good */}
    ## Authentication

    {/* Avoid */}
    ## How to Set Up Authentication in Your Application
    ```

  </Accordion>

  <Accordion title="Use sentence case" icon="font">
    Capitalize only the first word and proper nouns:

    ```markdown
    {/* Good */}
    ## Getting started with the API

    {/* Avoid */}
    ## Getting Started With The API
    ```

  </Accordion>
</AccordionGroup>

## What's Next?

<Columns cols={2}>
  <Card title="SEO Optimization" icon="magnifying-glass-chart" href="/content/seo">
    Improve discovery and metadata
  </Card>
  <Card title="Frontmatter" icon="file-lines" href="/content/frontmatter">
    Define titles, descriptions, and SEO fields
  </Card>
</Columns>
