microdata
microdata は、機械判読可能なデータを HTML ドキュメントに埋め込むための仕様です。マイクロデータは、語彙に従って定義された名前と値のペア(items
)で構成されます。よく使用されるマークアップ ボキャブラリのコレクションは schema.org で提供されています。
基本構文には、アイテムを定義する itemscope
属性と、アイテムのプロパティの 1 つを記述する itemprop
属性が含まれています。タイプは itemtype
属性を使用して指定し、選択した用語集で定義された値を想定できます。たとえば、schema.org
は http://schema.org/Person
や http://schema.org/PostalAddress
などの型を定義します。
次の例(Wikipedia から)は、microdata を使用して人物を記述する方法を示しています。
<section itemscope itemtype="http://schema.org/Person">
Hello, my name is
<span itemprop="name">John Doe</span>,
I am a
<span itemprop="jobTitle">Graduate research assistant</span>
at the
<span itemprop="affiliation">University of Dreams</span>
My friends call me
<span itemprop="additionalName">Johnny</span>
You can visit my homepage at
<a href="http://www.example.com.com" itemprop="url">www.example.com</a>
<section itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
I live at
<span itemprop="streetAddress">1234 Peach Drive</span>
<span itemprop="addressLocality">Warner Robins</span>
<span itemprop="addressRegion">Georgia</span>.
</section>
</section>
スキーマ検証ツールでマークアップをデバッグし、サポートされているスキーマと照らし合わせて検証します。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-12-21 UTC。
[null,null,["最終更新日 2024-12-21 UTC。"],[[["Microdata is an HTML specification used to embed machine-readable data in webpages using name-value pairs called `items` which are defined within a vocabulary."],["Schema.org provides commonly used vocabularies to structure the data, and items are marked up with attributes like `itemscope`, `itemprop`, and `itemtype` for machines to understand."],["The syntax involves defining an `item` and its `properties` using these attributes, and specifying a vocabulary such as schema.org for types like `Person` or `PostalAddress`."],["You can validate your Microdata implementation using the Schema Validator tool to ensure correctness and compatibility with supported schemas."]]],["Microdata embeds machine-readable data in HTML using name-value pairs called items. `itemscope` defines an item, `itemprop` describes its properties, and `itemtype` specifies its type from a vocabulary (e.g., schema.org). For example, the `Person` type can include properties like `name`, `jobTitle`, and `address`. The Schema Validator tool is available for debugging and validating microdata markup against supported schemas.\n"]]