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.
Activity
mcanouil commentedon Jun 24, 2025
In the future, please use the issue template to ensure the team has all the information it needs.
Also, if you want to ask a question about a behaviour, as documented in the issue templates, prefer the discussion board.
mcanouil commentedon Jun 24, 2025
The
<header>seems to be an oversight from previous PRs.It gets a bit weirder if you change your
index.qmdwith:# Headeris not the one being promoted to the title block.Add border since weird things are still happening with h1 placement