问题原文
原帖链接 · Sharper · CC BY-SA 3.0
I've created a quick proof of concept in codepen which I'd like some advice on. Would this be more SEO friendly than tabbed content using display:none?
I'm not looking to get on the wrong side of Google, and would like some informed opinion on this before I move past a quick pen.
http://codepen.io/sharperwebdev/pen/LkzarX?editors=1111
已采纳解答
原帖链接 · Stephen Ostermiller · CC BY-SA 3.0
The technical means used to hide content is not important at all to Google. Google can detect a variety of mechanisms used to hide text:
display:nonevisibility:hidden- zIndex
- Text color matching the background color
- Moving an element off screen
Google will only penalize a site for hidden text in cases where the site is trying to deceive Google into indexing content that not seen by users. Hiding content in a tab that users can easily click to see will not get a site penalized, regardless of the technical means used to hide tabs.
On the other hand, Google usually chooses not to index text that isn't visible on the page when it loads. Even if Google does index it, it is unlikely to rank well for its keywords. It doesn't matter what technical means you use to hide text, hidden text has little SEO value.
If the text is important enough to have indexed and ranked in search engines, you need to put it on its own page. Clicking on the tab should change the URL. Users coming into this unique URL would need to see the contents of that tab.
Assigning a tab to a URL does not necessarily preclude using JavaScript to show and hide tabs. When JS shows and hide tabs, the JS can use pushstate to change the URL. When the page loads, the correct tab can be shown either server side, or client side based on the URL.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
