问题原文
原帖链接 · forgeaboit · CC BY-SA 3.0
It seems using double quote " to represent inches on a page doesn't cause any real harm in regards to search engines and SEO.
However, I'm curious about the impact of the "correctness" of the page, and that possible effect on SEO.
For example, the product title 14" Lamp Stand technically breaks the HTML structure, like so:
<meta property="og:title" content="14" Lamp Stand"/>
This tag is "correct" up until 14, ie. this tag would appear to be:
<meta property="og:title" content="14"
With some random broken data coming after content was closed.
Since many of the products contain the double quote ", most product pages have cascading broken HTML structures (the tags are broken until the product title appears in another tag, fixing the unclosed double quote ", but then breaks again when the product title appears again, and so on, etc...).
Viewing the page source in FireFox's Source Viewer shows almost the entire page in red (broken tags) - as does google's Structured Data Testing Tool.
Is this an actual problem - or do search engines just "figure it out"? The pages render properly, so apparently the browsers figure it out, even if the markup is technically incorrect. This is for a well established site that's been around for many years, although that doesn't say SEO couldn't be improved. Am I worrying too much?
已采纳解答
原帖链接 · Tim Fountain · CC BY-SA 3.0
Your HTML is incorrect, as you seem to realise. HTML entities inside attributes should be correctly encoded, so:
<meta property="og:title" content="14" Lamp Stand"/>
then you won't have any problems.
Search Engines may well 'figure it out', but you're giving them bad data and hoping they interpret it correctly. Much better to just fix the problem if you can.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
