Вы находитесь на странице: 1из 2

offer, for example, profile information in hCard format; thus you may already have a microformatted profile even

if youve never used microformats before. You can find out more about the many microformats and the process for creating a new one on the Microformats wiki ().

A lightning introduction to microformats


Just in case youve never used them before, Ill briefly introduce some simple microformatshopefully so simple youll be encouraged to try them right away.

Using rel-license for licensing information


Adding license information is quite a common activity, and while we can add a link to Creative Commons or another license easily enough, someone would have to read it to understand the contents license. <small>This article is licensed under a <a href="http://creativecommons.org/licenses/byncsa/2.0/">Creative Commons Attribution Non-commercial Share-alike (By<abbr>NC</abbr><abbr>SA</abbr>) license</a>.</small> If this information was machine-readable, it would help consumers searching for content with a specific license. By using the microformat to add to the link (indicating its the license for the pages main content), we can do just that. <small>This article is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.0/">Creative Commons Attribution Non- commercial Share-alike (By-<abbr>NC</abbr>-<abbr>SA</abbr>) license</a>.</small> This may be so easy you dont even realize youve just microformatted the link. Google uses this data to allow searches by license, as shown in Figure 4-14 (look in advanced search, in the extra options). This basic microformat has become part of HTML5 as one of the link types, added as a rel="" value to an <a>, <link>, or <area> element (30).

Using XHTML Friends Network (XFN)


Maybe we should term this one eXtensible Friends Network instead :-) This is a way of specifying your relationship with peopleeverything from "met" to "sweetheart"

using the attribute on a link to their homepage. However, there are three main values. Someoneyouknowhowtogetintouchwith. Allowsyoutoclaimyourvariouswebsites,includingyouraccount sonsocialnetworks. Alinktothecurrentarticlesauthor,suchastotheirwebsite orprofilepage(andthe only one of these three link types thats in the HTML5 spec). We can use the last two to prove our identity online using only links. For example, if your humble author had a website or profile page, he could add a link to his Twitter account. <p>Oli Studholme <a href="https://twitter.com/boblet">follow me on Twitter (@boblet)</a></p>

While a person can infer that is his Twitter username, by adding we can state this relationship in a machine-readable way.

Вам также может понравиться