background preloader

HTML Microdata

HTML Microdata
Abstract This specification defines the HTML microdata mechanism. This mechanism allows machine-readable data to be embedded in HTML documents in an easy-to-write manner, with an unambiguous parsing model. It is compatible with numerous other data formats including RDF and JSON. Status of This document This section describes the status of this document at the time of its publication. This document was edited in place on 23 June 2014 to fix a wrong "Previous Version" link. If you wish to make comments regarding this document in a manner that is tracked by the W3C, please submit them via using our public bug database. The bulk of the text of this specification is also available in the WHATWG HTML Living Standard, under a license that permits reuse of the specification text. Publication as a Working Group Note does not imply endorsement by the W3C Membership. The latest stable version of the editor's draft of this specification is always available on the W3C HTML git repository. 1 Dependencies | Official Website HTML5 This specification defines the 5th major version, second minor revision of the core language of the World Wide Web: the Hypertext Markup Language (HTML). In this version, new features continue to be introduced to help Web application authors, new elements continue to be introduced based on research into prevailing authoring practices, and special attention continues to be given to defining clear conformance criteria for user agents in an effort to improve interoperability. This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at This document was published by the Web Platform Working Group as a W3C Recommendation for HTML 5.2 that would obsolete the HTML 5.1 Recommendation. This document was produced by a group operating under the W3C Patent Policy.

5 Microdata — HTML5 (including next generation additions still i Microdata 5.1 Introduction 5.1.1 Overview This section is non-normative. Sometimes, it is desirable to annotate content with specific machine-readable labels, e.g. to allow generic scripts to provide services that are customised to the page, or to enable content from a variety of cooperating authors to be processed by a single script in a consistent manner. For this purpose, authors can use the microdata features described in this section. 5.1.2 The basic syntax At a high level, microdata consists of a group of name-value pairs. To create an item, the itemscope attribute is used. To add a property to an item, the itemprop attribute is used on one of the item's descendants. Here there are two items, each of which has the property "name": <div itemscope><p>My name is <span itemprop="name">Elizabeth</span>. Markup without the microdata-related attributes does not have any effect on the microdata model. <div itemscope><p>My <em>name</em> is <span itemprop="name">E<strong>liz</strong>abeth</span>. Microdata support for Rich Snippets Webmaster Level: All HTML5 is the fifth major revision of HTML, the core language of the World Wide Web. The HTML5 specification includes a description of microdata, a new markup standard for specifying structured information within web pages. Today, we’re happy to announce support for microdata for use in rich snippets in addition to our existing support for microformats and RDFa. By using microdata markup in your web pages, you can specify reviews, people profiles, or events information on your web pages that Google may use to improve the presentation of your pages in Google search results. Here is a simple HTML block showing a section of a review of “L’Amourita Pizza”: Here is the same HTML with microdata added to specify the restaurant being reviewed, the author and date of the review, and the rating: Microdata has the nice property of balancing richness with simplicity. To get started, here are some helpful links: Written by Siddhartha Chattopadhyay, Kavi Goel, Ramanathan V.

HTML5/RDFa Arguments When I came back from holiday, I caught up with the recent discussions around RDFa and HTML5. It’s exhausting reading so many posts repetitively reiterating the positions of people who all have the best of intentions but fundamentally different priorities. And such a shame that so much energy is spent on fruitless discussion when it could be spent at the very least improving specifications, if not testing, implementing, experimenting or otherwise in some very minor way changing the world. The particular thread’s subject was the use of prefixes, which are used to provide a shorthand for URIs, which are used to name properties such as It’s unquestionable, really, that prefixes are a source of problems: But underlying the arguments about the costs of prefixes are arguments about whether these disadvantages are important enough to stop For example, say that I have a page that contains the triple: or, in a more realistic frame of mind:

Microdata (HTML5) Microdata is a WHATWG HTML specification used to nest metadata within existing content on web pages.[1] Search engines, web crawlers, and browsers can extract and process Microdata from a web page and use it to provide a richer browsing experience for users. Search engines benefit greatly from direct access to this structured data because it allows search engines to understand the information on web pages and provide more relevant results to users.[2][3] Microdata uses a supporting vocabulary to describe an item and name-value pairs to assign values to its properties.[4] Microdata is an attempt to provide a simpler[citation needed] way of annotating HTML elements with machine-readable tags than the similar approaches of using RDFa and microformats. Microdata vocabularies provide the semantics, or meaning of an Item. Web developers can design a custom vocabulary or use vocabularies available on the web. Here is the same markup with added[5][6][7] Microdata:

About RDFa Balisage du contenu à l'aide de RDFa RDFa permet d'associer des libellés à des types d'informations spécifiques, telles qu'un avis sur un restaurant, un événement, une personne ou une fiche produit. Ces types d'informations sont appelés entités ou éléments. Chaque entité comporte un certain nombre de propriétés. Par exemple, une personne est associée aux propriétés suivantes : nom, adresse, fonction, entreprise et adresse e-mail. En règle générale, RDFa utilise des attributs simples dans les balises XHTML (souvent <span> ou <div>) pour affecter des noms concis et descriptifs aux entités et aux propriétés. <div> Je m'appelle Pierre Dumoulin, mais on m'appelle Pierrot. Vous trouverez ci-dessous le même contenu HTML balisé au format RDFa. <div xmlns:v=" typeof="v:Person"> Je m'appelle <span property="v:name">Pierre Dumoulin</span>, mais on m'appelle <span property="v:nickname">Pierrot</span>. Description de l'exemple Éléments imbriqués Contenu masqué

RDFa RDFa is a way of expressing RDF in XHTML. Creative Commons uses RDFa to express license and other information about works for the semantic web. When you select a license in our license chooser, you are given a snippet of HTML that contains RDFa. By using RDFa, Creative Commons is helping build the semantic web. But to a machine, the web is merely a heap of human-readable-data that needs to be classified by seemingly arbitrary rules. While incoming links are good semantic indicators of value (or popularity) of a page, web pages should be able to express much more sophisticated statements to machines. Furthermore, humans should have the ability to query these knowledge statements in sophisticated ways. The vision behind the semantic web is that storing and retrieving information on the web should not require machines parsing human language but rather machines parsing machine language. RDF stands for "Resource Description Framework" which is not a particularly informative acronym.