속성은 항목에 속해야합니다. itemscope
속성을 가진 항목을 만들고 (이 항목에 itemtype
속성을 부여 할 수 있습니다).
itemscope
이 없으면 마크 업 예가 잘못되었습니다.
단지 head
요소 내에 마이크로 데이터를 제공 할 수있다, 그러나 그것은 두 가지 이유 때문에하지 않는 것이 좋습니다 : 마이크로 데이터가 기존 마크 업에 사용하기위한 한
귀하의 예는 다음과 같이 수 : 빨리 당신이 더 필요로
<head itemscope itemtype="http://schema.org/Article">
<meta itemprop="name" content="The Name or Title Here">
<meta itemprop="description" content="This is the page description">
<link itemprop="image" href="http://www.example.com/image.jpg">
</head>
그러나 :
<head>
<style itemscope itemtype="http://schema.org/Article" itemref="p1a p1b p1c"></style>
<meta id="p1a" itemprop="name" content="The Name or Title Here">
<meta id="p1b" itemprop="description" content="This is the page description">
<link id="p1c" itemprop="image" href="http://www.example.com/image.jpg">
</head>
당신이 head
요소에 itemscope
를 사용할 수 있다면, 그것은 더 나은 것 하나의 항목 (일반적으로 Organization
/Person
인 경우, author
등)보다 빠릅니다. k는 더 이상 필요하지 않으며, 첫 번째 발췌 문장과 같은 해결책이 필요합니다.
body
요소 내에서 meta
/link
요소를 Microdata에 사용할 수 있습니다. 이렇게하면 itemscope
에 div
요소를 사용할 수 있으므로 더 쉽게 사용할 수 있습니다.
<div itemscope itemtype="http://schema.org/Article">
<meta itemprop="name" content="The Name or Title Here">
<meta itemprop="description" content="This is the page description">
<link itemprop="image" href="http://www.example.com/image.jpg">
</div>
이 (내가
link
요소와
image
속성에 대한
meta
요소를 교체
using meta
is invalid for this purpose 이유는 대신 기존 콘텐츠를 마크 업의 콘텐츠를 복제 그래서하더라도,
body
에서이 작업을 수행하는 것이 바람직 할 것 .)
굉장히 간단하고 효과적이다. 나는 기사의 블로그 웹 사이트 비디오 등을 전환 한 후 어쨌든간에 태그를 수정하는 것이 사이트가 쉽지 않다라고 생각한다. 생각하고 오픈 그래프에 충실하십시오. – C0nw0nk
@ C0nw0nk Open Graph의 경우에도 실제로는 '가 필요하지만 대부분의 파서에서는 필요하지 않습니다. [ogp.me] (http://ogp.me)를 참조하십시오. – insertusernamehere
당신은'itemscope만이 정의되지 않은 타입으로 존재한다면 말했습니다 .' 기사, 비디오, 이미지, 블로그 등 모든 유형에 보편적으로 사용될 수있는 정의되지 않은 타입의 예를 줄 수 있습니까? – C0nw0nk