多くのコンテンツがあるページでは、最近、希望のコンテンツのみを表示するためにcss:targetを使用することが好きになりました。コードはこのようなものに見えることがあります。検索エンジンはどのように表示されるコンテンツを処理しますか:target?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Test Page</title>
<style type="text/css">
body {font-family:sans-serif;}
#some-content>*,
#some-content>*:target ~ h2:last-of-type,
#some-content>*:target ~ h2:last-of-type+* { display: none; }
#some-content>h2:target,
#some-content>h2:target+*,
#some-content>h2:last-of-type,
#some-content>h2:last-of-type+* { display: block; }
</style>
</head>
<body>
<h1>Test Page</h1>
<ol>
<li><a href="#test-1">First link</a></li>
<li><a href="#test-2">Second link</a></li>
<li><a href="#test-3">Third link</a></li>
<li><a href="#test-4">Fourth link</a></li>
<li><a href="#test-5">Fifth link</a></li>
</ol>
<div id="some-content">
<h2 id="test-1">First header</h2>
<p>First content</p>
<h2 id="test-2">Second header</h2>
<p>Second content</p>
<h2 id="test-3">Third header</h2>
<p>Third content</p>
<h2 id="test-4">Fourth header</h2>
<p>Fourth content</p>
<h2 id="test-5">Fifth header</h2>
<p>Fifth content</p>
</div>
</body>
</html>
を私の質問は2つあり:
- 現代のスパイダーはアンカーリンクをたどるのですか?
- もしそうでなければ、最後のh2とその次の兄弟だけがspideredされますか?
この質問は、SEOについてのものであり、http://webmasters.stackexchange.com/で最適なので、話題にはならないようです。 – KatieK
私は同意します。当時私はよく分かっていなかった。 :) – kojiro
Meh、私は同意することができます、それは[On Hold]になりますが、@ John Condeは既にそれに答えているので削除できませんので、私は自動downvoteを取得します。ブー。 – kojiro