HTML META 标签的长度限制是多少?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1172223/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What is the length limit of the HTML META tags?
提问by gabor
And how do the constraints differ in practice on various browsers?
各种浏览器在实践中的约束有何不同?
回答by Shoban
Meta Description Tag Length: It's not the number of words that count. It's actually the number of characters length. Because, Google will cut off anything more than 155(roughly) characters. Optimizing for in the description and try to limit its length to 25-30 words. Also try to use no more than two sentences.
元描述标签长度:重要的不是字数。它实际上是字符长度的数量。因为,Google 会切断超过 155 个(大约)字符的任何内容。在描述中优化并尝试将其长度限制在 25-30 个单词。也尽量使用不超过两个句子。
Taken from http://online-seo-information.blogspot.com/2009/01/meta-description-tag-length-examples.html
取自http://online-seo-information.blogspot.com/2009/01/meta-description-tag-length-examples.html
回答by Izzy
The limit is More like 265 characters, as Aviva Blumsteinfound out in an experiment she carried out and published under the title Tested: The Best Length for a Description Tag is Longer Than You Thinkin 9/2011. While it is true that the snippetsshown are cut down to a little less than 160 characters (looks like "at the closest word boundary before 160 chars are reached"), the entire description is used for display, but only the first ~265 characters are really searched for the keyword specified.
限制更像是 265 个字符,正如Aviva Blumstein在她进行的一项实验中发现的那样,并在2011 年 9/2011中以“已测试:描述标签的最佳长度比您想象的更长”为题发表。虽然显示的片段确实减少到略少于 160 个字符(看起来像“在达到 160 个字符之前最接近的单词边界处”),但整个描述都用于显示,但只有前 ~265 个字符真正搜索指定的关键字。
Doing a little math, I come out at a maximum useful length of 265 + 160 - lastword_length
(as the last word ending beforereaching the 165thcharacter is the last one searched for the keyword), which makes roughly 400 characters(425 minus that "last word", including some "tolerance" as you probably don't want to count precisely where the boundary will run).
稍微算一下,我得出的最大有用长度为265 + 160 - lastword_length
(因为在达到第 165个字符之前结束的最后一个单词是搜索关键字的最后一个单词),大约有 400 个字符(425 减去“最后一个单词”,包括一些“容差”,因为您可能不想精确计算边界将运行的位置)。
So while the keywordsyou want to be found should be within the first 265 characters, you can extend your meta-desc beyond that limit.
因此,虽然您要查找的关键字应在前 265 个字符内,但您可以将元描述扩展到该限制之外。
回答by scunliffe
I think the general view is that if you think the length of your META tag might be too long, then it IS too long!
我认为一般的观点是,如果您认为您的 META 标签的长度可能太长,那么它就是太长了!
For keywords and description tags I realized some folks want to stuff every possible term they can think of in there but its a lost cause. The content of your site will get you ranked in Google and similar much better than spamming the META tags.
对于关键字和描述标签,我意识到有些人想把他们能想到的每一个可能的术语都塞进去,但这是一个失败的原因。您网站的内容将使您在 Google 和类似网站中的排名比垃圾邮件 META 标签要好得多。
How Google uses Meta tagswhich describes using a short description... and Google doesn't even look at the "keywords" tag. (which is typically the one SEO trigger happy marketing folks stuff full of crud)
Google 如何使用使用简短描述进行描述的Meta 标签……而 Google 甚至不看“关键字”标签。(这通常是一个 SEO 触发快乐营销人员的东西充满了 crud)
回答by Web Design Company
Ideal character/ words limit in google of title = 66 and in yahoo = 120 Meta-Description = 150 to 160 Characters
谷歌标题的理想字符/字数限制 = 66 和雅虎 = 120 元描述 = 150 到 160 个字符
回答by Tim Hoolihan
The w3c makes no mention of size limits meta at w3c.org. As for browser implementations, you would need to look at the individual browser's source code and/or documentation.
w3c在 w3c.org 上没有提到大小限制元。至于浏览器实现,您需要查看各个浏览器的源代码和/或文档。
回答by Harrey Martin
Meta limits for Title max. 65char and for Description 160char
标题最大值的元限制。65char 和用于描述 160char
回答by CWDS
Search engines generally truncate snippets longer than 160 character
搜索引擎通常会截断长度超过 160 个字符的片段