background preloader

MICRODATI

Facebook Twitter

HTML Microdata. 5 Microdata. 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>. Microdati HTML5: ecco come usarli in modo corretto. Oggi ci occuperemo dei microdati in Html5, un ottimo modo per ottenere visibilità ancor prima che l'utente clicchi sul nostro link attraverso Google. I microdati infatti vengono visualizzati direttamente sotto le SERP e permettono di dare valore aggiunto ad alcuni importanti elementi della nostra azienda e/o attività. Scopriamo insieme cosa sono e come usarli in modo corretto. Che cosa sono i microdati? I microdati sono elementi introdottti dal nuovo standard HTMl5 e permettono di visualizzare informazioni utili direttamente nelle SERP di Google. Per maggiori delucidazioni vi invito a dare un'occhiata a questo screenshot che raffigura un perfetto uso di microdati: Lo screen è stato preso da Google uno dei primissimi siti (insieme a LinkedIn) che ha adottato questa "tecnica" per valorizzare i propri account.

Passimo alla sintassi: i microdati vanno distinti per vocabolari, possiamo consultare una lista delle proprietà disponibili a seconda del settore a questo indirizzo ufficiale. Web Developer Tutorial: HTML5 Microdata. The HTML5 draft specification includes Microdata. The Microdata spec provides a standardized syntax for additional semantic markup to your web pages to enhance the machine readability of your web pages. It’s purpose isn’t to make a new widget appear on your web page but to help automated programs like google understand and better handle the content of your web pages.

HTML5 Microdata has the same basic mission as RDFa and Microformats but differs slightly in implementation and use. HTML5 microdata allows you at add structured markup to any HTML element that is bot-readable, standardized and won’t cause any problems with browsers that don’t support it. As browsers add real support for HTML5 microdata, you will see an explosion of tools to enable faster data entry, collection and better accessibility options for people with disabilities. RDFa is an XML namespace that allows you to add semantic markup to XHTML pages.

Overview Itemscope and itemtype The itemtype url can point to anything. HTML5 Microdata: Welcome to the Machine. I don't think it is hyperbole to say that HTML5 will change the way that you think about web development. I welcome many of the changes as they make development easier, and the user experience richer. With any change, though, there is certain to be a bit of trepidation and controversy. One addition that certainly is not without its controversy is the Microdata specification, but I believe the benefits of this very simple specification are going to change how you look at your mark-up in the very near future. Introduction and Scope: Context for Machines I am focusing on the Microdata specification in this tutorial. You do need to understand that the specification is not solid at the moment, nor is it widely adopted. In fact, during the course of my writing, the specification changed. To understand the controversy, you need to understand that Microdata is a subset of making a document have meaning to machines, just as it has meaning to a reader of the document.

Microdata in Practice: Events. How to Create an HTML5 Microdata Powered Resume. In May 2009, Google introduced Rich Snippets, a small block of information displayed in Google's search engine results to make it easier for users to decide which pages are relevant to their search. In June 2011, Google announced the creation of Schema.org, a new initiative from Google, Bing and Yahoo! That aims to improve the web by creating structured data markup schema. This tutorial demonstrates how to create an online resume that incorporates Schema.org Microdata. The tutorial also includes instructions on how to use Authorship Markup! The tutorial demo is a one page site template that you are free to use for your online resume. Please note that this is not a web design or CSS tutorial, so only the HTML5 and Schema.org Microdata markup will be covered. Now, let's begin! Create a CSS style sheet called "style.css" and include the following code. Next, we need an .html.

Here is a screenshot of the online resume demo when viewed in (IE8 Click on image to see full image): Extending HTML5 — Microdata. For those who like (to argue about) semantics, HTML5 is fantastic. Old presentational elements now have new semantic meanings, there’s a slew of new semantic elements for us to argue about, and we've even in<cite>d a riot or two. But that's not all! Also in HTML5 is microdata, a new lightweight semantic meta-syntax. Using attributes, we can define nestable groups of name-value pairs of data, called microdata, which are generally based on the page’s content. It gives us a whole new way to add extra semantic information and extend HTML5. Let’s go through these new attributes and see how to use them in practice with everyone’s favourite example band, Salter Cane. Microdata syntax # itemscope and itemprop # <p itemscope>I’m going to the <span itemprop="name">Salter Cane</span> gig next week.Excited!

The presence of itemscope on the <p> element makes it into a microdata item. Itemprop names can be words or URL strings. Itemprop value from an attribute # Nested items # Multiple properties # Person.