A compound Microformat (e.g., hCard) has properties and subproperties.
An elemental Microformat is just a single attribute with a value.
In this tutorial you will learn how to use the following elemental Microformats in your (X)HTML, BLOG, and RSS/ATOM documents:
VoteLinks
XFN (XHTML Friends Network)
Rel-Nofollow
Rel-Tag
Rel-License
Rel-Directory
VoteLinks
This elemental Microformat is used when you are linking to something and you want to indicate that you
support it (vote for it), don't support it (vote against it), or don't have an opinion (abstain).
On your link element (<a>) add an attribute rev. Give it one of these values:
Example: in the Web page below the first link votes for naturapathy, the second link votes against allopathy, and the
third link abstains on Shamanism.
With hReview you can indicate whether or not you support something, and you can
express your "vote" with much higher fidelity than a simple up/down/neutral statement.
Plus, with hReview you can express *why* you support or don't support something.
Grouping together these things is very important: (1) An indication of your vote on a
resource, and (2) An indication of why you voted the way you did. hReview allows you
to do this grouping, VoteLinks doesn't.
XFN
This elemental Microformat is used on links to express social connections.
On the link element add an attribute rel. Give it one or more of these values:
Example: add the XFN Microformat to this HTML text:
<a href="http://www.example.org/blog/ssmith">Sally Smith</a> is a co-worker and friend.
Here is the marked up HTML text:
<a href="http://www.example.org/blog/ssmith" rel="met co-worker">Sally Smith</a> is a co-worker and friend.
Confused about the "me" value? It is used to indicate: "the entity I am linking to is also me." For example, you
may have a work URL, a personal URL, a blog URL, etc. They all represent the same person. When linking between
them use "me".
XFN
XFN enables the creation of sophisticated networks of social connections.
It enables Web tools to discover hitherto unbeknownst connections.
Example: suppose on my work Web site (costello) I have an HTML document containing these two links:
don't count this link when ranking pages (recall that Google ranks high a Web page with lots of links to it)
Rel-nofollow
Here is one usage of this elemental Microformat: Suppose that on your Web site you have links to related
products. And suppose that you don't like one of these products (but you link to it as a courtesy to your visitors).
Ordinarily your link would cause Google to rank the product a little higher. By adding rel="nofollow" you
prevent your link from raising the ranking of the undesirable product. Thus you make the link available to
your visitors, but you don't promote it.
On a link element add an attribute rel. Its value is:
tag
And as the value of the href attribute give the URL to a "tag space"
(a Web site that collates or defines tags). The tag is the last part of the URL (after the last /).
The purpose of Rel-Tag is to assign a tag to your current Web page.
However, these are not the only tag spaces. Any Web page that has a "logical URL" can be a tag. For example,
on my Web site is a Web page with this (logical) URL:
Consider a Web tool that searches for Web pages containing rel="tag" in a link. It collects each
Web pages' URL plus the tag name. With this information a search tool can be created. A user of the search tool
can issue a query such as this:
Search: juicer
The search tool then returns all Web pages that have been tagged with "juicer".
In fact, Technorati does this. It has collected all the tags created
by the entire Web. When you enter a search string (tag name), it returns all the Web pages with that tag name.
This Web site: http://yedda.com is a question/answer service - you ask a question
and people will answer. The questions are tagged using Rel-tag.
A Web tool can use this information to find, for example, all Web pages that are available under
the Creative Commons license.
Example: Yahoo offers the ability to search for Web pages that are available under the Creative Commons license
(try it out with this search string: democrats vs republicans):
Acupuncture_and_Chinese_Medicine/" rel="directory">Acupuncture not Anesthesia</a>
</h1>
Read as: "The title of this Web page is Acupuncture not Anesthesia. The category under which this Web page should be placed
on dmoz.org is the Acupuncture_and_Chinese_Medicine section under Alternative_Medicine, under Health, under
Books, under Publications, under Shopping." Note: dmoz.org is a Web site that has a category hierarchy.
Rel-Directory
Rel-Directory enables a directory site (e.g., dmoz.org) to be "populated" remotely, i.e., it enables
the distributed, bottom-up creation of directories.
A Web tool can collect the URLs of all Web sites that list themselves under the Acupuncture_and_Chinese_Medicine category.
Read as: "Hey Web crawlers, don't count this link when ranking the Web site brand_x.com. And hey vote counting
Web tools, I hereby vote against Brand X."
Note that two elemental Microformats are being used simultaneously: Rel-nofollow and VoteLinks.
Acupuncture_and_Chinese_Medicine" rel="tag directory">Acupuncture not Anesthesia</a>
</h1>
Read as: "The title of this Web page is Acupuncture not Anesthesia. The page is tagged as
Acupuncture_and_Chinese_Medicine. The category under which this Web page should be placed
on dmoz.org is the Acupuncture_and_Chinese_Medicine section under Alternative_Medicine, under Health, under
Books, under Publications, under Shopping."
Note that two elemental Microformats are being used simultaneously: Rel-tag and Rel-directory.
Lab 1
Markup the following HTML text using the elemental Microformats.