大网数据广告活动
网站运营与故障问答

Pipes or colons in HTML title tags?

· 52CE 我爱测

Other than esthetics, are there any valid reasons to choose pipes vs colons in an HTML <title> tag, or vice-versa? Usability? SEO? Example: <title>Example.com | Top 10 list of stuff</title> or <title>Example.com: Top 10 list of s…

问题原文

原帖链接 · Dan Gayle · CC BY-SA 4.0

Other than esthetics, are there any valid reasons to choose pipes vs colons in an HTML <title> tag, or vice-versa? Usability? SEO?

Example:

<title>Example.com | Top 10 list of stuff</title>

or

<title>Example.com: Top 10 list of stuff</title>

已采纳解答

原帖链接 · unor · CC BY-SA 3.0

If it’s only colon vs. pipe: Use the pipe.

1. The colon might (more) often be part of the page title.

It might be confusing to have two colons. Example for an article called "Top 10: Songs":

Example.com: Top 10: Songs

It seems as if "Top 10" would be some kind of second-level category here.

2. The site title should come after the page title. The colon wouldn’t make sense anymore.

As often only the first part of the title is shown to users (e.g., as part of the tab label in browsers) or users only read the first part (e.g., in search result lists), it’s more useful to see the beginning of the article/page than the site. Otherwise users wouldn’t be able to find the page they are looking for when they have several pages of your site open:

[Exampl…] [Exampl…] [Exampl…] [Exampl…] [Exampl…]

So if you agree to switch the positions, then it wouldn’t make sense anymore to use a colon:

Top 10 list of stuff: Example.com

So it should be:

Top 10 list of stuff | Example.com

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2014-03-24)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0 / CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。