简体   繁体   中英

Can H1 be in a Title element?

For a better SEO, can I do something like that:

<title><h1>My title !</h1></title>

or I should delete the h1 element?

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

As the difference between the title tag and h1 was already explained, here is just a little note on what does improve your SEO:

Keep the title & h1 similar, but not identical. It's common practice to add a Brand or Website Name at the end of the title tag and use the same "topic" for the h1.

Example

<title>The difference between title & h1 | WebThings</title>

<h1>The difference between title & h1</h1>

不,您必须删除 H1 标签,因为您不能在标题标签中放置任何内容

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM