开发者

Character entities in XHTML 1.0 metadata?

开发者 https://www.devze.com 2023-02-15 16:10 出处:网络
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 r

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 res开发者_开发技巧umé if you don't believe me." />

OR:

<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." />


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:


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

0

精彩评论

暂无评论...
验证码 换一张
取 消