XHTML 1.0 元数据中的字符实体?

发布于 2024-10-21 05:22:11 字数 573 浏览 1 评论 0原文

对于具有 XHTML 1.0 Doctype 的页面上的标题、关键字和描述字段,非 ascii 字符(如 – é 等)的正确用法是什么?爬虫和社交媒体网站是否可以更好地将它们解读为:

<title>My webpage — a study in typesetting</title>
<meta name="description" content="A page about character entities in XHTML.  Check my resumé if you don't believe me." />

或者:

<title>My webpage &mdash; a study in typesetting</title>
<meta name="description" content="A page about character entities in XHTML.  Check my resum&#0233; if you don&apos;t believe me." />

For my title, keywords and description fields on a page with an XHTML 1.0 Doctype what is the correct usage for non-ascii characters like – é etcetera? Do crawlers and social media sites read them better as:

<title>My webpage — a study in typesetting</title>
<meta name="description" content="A page about character entities in XHTML.  Check my resumé if you don't believe me." />

OR:

<title>My webpage — a study in typesetting</title>
<meta name="description" content="A page about character entities in XHTML.  Check my resumé if you don't believe me." />

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

把回忆走一遍 2024-10-28 05:22:11

您最好坚持使用本机字符,但指定编码类型。对于国际字符集,坚持使用 UTF-8 是安全的:

You're best to stick to the native characters, but speficy the encoding type. for international charactersets, it's safe to stick with UTF-8:

老娘不死你永远是小三 2024-10-28 05:22:11

如果您在 HTTP 标头(而不仅仅是 HTML 标头)中正确声明了字符集,那么它应该没有任何区别。

If you declared your character set correctly in the HTTP header (and not only the HTML head), then it should make absolutely no difference.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文