Skip to content

fix: title tag rendering - #5691

Open
sumitpsm wants to merge 2 commits into
DioxusLabs:mainfrom
sumitpsm:fix-title-rendering
Open

fix: title tag rendering#5691
sumitpsm wants to merge 2 commits into
DioxusLabs:mainfrom
sumitpsm:fix-title-rendering

Conversation

@sumitpsm

@sumitpsm sumitpsm commented Jul 21, 2026

Copy link
Copy Markdown

The IndexHtml::new() parser splits on <title> to find where to inject the dynamic title. Without a <title> tag, it can't find a split point, so the dynamic title gets placed before <html>.

Before: <title> is getting rendered before every html elements

<title>Your Title ...</title><!DOCTYPE html>
        <html>
            <head> <!-- stuff --></head>
            <body>
                <!-- stuff -->
            </body>
        </html>

After: <title> is rendered inside <head> tag

<!DOCTYPE html>
<html>
    <head>
        <title>Your Title ...</title>
    <!-- stuff --></head>
    <body>
        <!-- stuff -->
    </body>
</html>

@sumitpsm
sumitpsm requested a review from a team as a code owner July 21, 2026 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants