Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Microdata
adalah spesifikasi untuk menyematkan data yang dapat dibaca mesin dalam dokumen HTML. Microdata terdiri dari pasangan nilai nama (dikenal sebagai items) yang ditentukan sesuai dengan kosakata. Kumpulan kosakata markup yang umum digunakan disediakan oleh schema.org.
Sintaksis dasar mencakup atribut itemscope untuk menentukan item dan atribut itemprop untuk mendeskripsikan salah satu properti item. Jenis ditentukan menggunakan atribut itemtype dan dapat mengasumsikan nilai yang ditentukan dalam kosakata pilihan. Misalnya, schema.org menentukan jenis seperti http://schema.org/Person atau http://schema.org/PostalAddress.
Contoh berikut (dari Wikipedia) menunjukkan cara menggunakan microdata untuk mendeskripsikan seseorang:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-29 UTC."],[],[],null,["# Microdata\n\n[Microdata](https://html.spec.whatwg.org/multipage/microdata.html#microdata)\nis a specification to embed machine-readable data in HTML documents. Microdata consists of name-value pairs (known as `items`) defined according to a vocabulary. A collection of commonly used markup vocabularies are provided by [schema.org](https://schema.org/).\n\nThe basic syntax includes the `itemscope` attribute to define an item and the `itemprop` attribute to describe one of the item's properties. Types are specified using the `itemtype` attribute and can assume values defined in the vocabulary of choice. For instance, `schema.org` defines types such as `http://schema.org/Person` or `http://schema.org/PostalAddress`.\n\nThe following example (from [Wikipedia](http://en.wikipedia.org/wiki/Microdata_(HTML)#Example)) shows how to use microdata to describe a person: \n\n \u003csection itemscope itemtype=\"http://schema.org/Person\"\u003e\n Hello, my name is\n \u003cspan itemprop=\"name\"\u003eJohn Doe\u003c/span\u003e,\n I am a\n \u003cspan itemprop=\"jobTitle\"\u003eGraduate research assistant\u003c/span\u003e\n at the\n \u003cspan itemprop=\"affiliation\"\u003eUniversity of Dreams\u003c/span\u003e\n My friends call me\n \u003cspan itemprop=\"additionalName\"\u003eJohnny\u003c/span\u003e\n You can visit my homepage at\n \u003ca href=\"http://www.example.com.com\" itemprop=\"url\"\u003ewww.example.com\u003c/a\u003e\n \u003csection itemprop=\"address\" itemscope itemtype=\"http://schema.org/PostalAddress\"\u003e\n I live at\n \u003cspan itemprop=\"streetAddress\"\u003e1234 Peach Drive\u003c/span\u003e\n \u003cspan itemprop=\"addressLocality\"\u003eWarner Robins\u003c/span\u003e\n \u003cspan itemprop=\"addressRegion\"\u003eGeorgia\u003c/span\u003e.\n \u003c/section\u003e\n \u003c/section\u003e\n\nCheck the [Schema Validator](/workspace/gmail/markup/testing-your-schema#schema_validator) tool to debug your markup and validate it against the supported schema."]]