Skip to content

How to change <Main /> in next/document to <main /> instead of <div />? #65779

Answered by icyJoseph
Pszz asked this question in Help
Discussion options

You must be logged in to vote

Hi,

Yeah I don't think this is possible in Pages Router,

const Body = ({ children }: { children: JSX.Element }) => {
, it is part of a trend that existed back in the day, to mount your app at a div, often called root, etc.

Semantically, it shouldn't matter, though, your main tag can still live within the __next root div.

Alternatively, App Router, gives you 100% control over this, so you might want to consider that option.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Pszz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants