For a better SEO, can I do something like that:
<title><h1>My title !</h1></title>
or I should delete the h1 element ?
2
Short answer: no, delete them.
The title tag does not support any internal tags. It is meant to be plain text and should be placed inside the head tag. Any tags inside it will be ignored/stripped out.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title
Heading tags are semantic tags that should be used inside the body of the HTML.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements
No, you must delete H1 tag because you can’t place anything in the title tag
Click here to cancel reply.
2
Answers
Short answer: no, delete them.
The title tag does not support any internal tags. It is meant to be plain text and should be placed inside the head tag. Any tags inside it will be ignored/stripped out.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title
Heading tags are semantic tags that should be used inside the body of the HTML.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements
No, you must delete H1 tag because you can’t place anything in the title tag