quarto-dev / quarto-dev/quarto-cli

h1 is wrapped in `header` tag even when title is provided in yaml (website project)

Open
#12,980 2 comments 1 reaction 1 assignee View on GitHub

@cscheid is already working on this.

Since Jun 30, 2025.

bug websites
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Hi,

I've noticed quarto is wrapping the first h1 heading into a separate header tag since version 1.6. I went through the discussion in issue #11618 and learned this is in part intended behavior. However, I think what I'm seeing might not be part of the desired functionality...

This is a minimal example:

index.qmd
::: {#custom-div}
# Div title

Some words as div's content

:::
_quarto.yml
project:
  type: website

website:
  title: 'Heading in header issue'

The output produced by quarto render on these files is

<!-- main -->
<main class="content" id="quarto-document-content">

<header id="title-block-header" class="quarto-title-block">
<h1 class="title display-7">Div title</h1>
</header>

<div id="custom-div">
<section id="div-title" class="level1">

<p>Some words as div’s content</p>
</section>
</div>

</main>
<!-- /main -->

Within the referenced issue I read something like this, where the first h1 heading is contained within a div, should not be used as the page title nor taken outside that div. This is exactly the behavior I observe when rendering a single file to html. However, when using the website project structure, and even though there's an explicit title provided for the project, the first h1 heading gets wrapped into a separate header tag and separated from the containing div in the source.

Is this intentional? Happy to help where I can.

[!NOTE]
Using quarto v1.7.32 (CLI) on debian bookworm.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.