|
Table of Contents
1. How to make Microformats
2. Types of Microformats
Microformats are used for semantic markup of website content, which simplifies its processing by search engine crawlers. Information about organizations, people, events, products, and other objects is structured using standard HTML or XHTML elements. Such markup is not visible to users and is used for better indexing of pages by search engines.
How to Make Microformats
Existing HTML or XHTML markup of a page, which has additional attributes. The most commonly used elements are class, title, rel, and rev. The class attribute, for example, allows you to specify the category of a particular code element on the page. All code elements are suitable for microformat markup, in particular the div and span elements, whose own standard semantic meaning is not defined.
A block with information about a person can be marked up as follows:
<div>
<div>Petr Petrov</div>
<div>LLC ConstructionInvest</div>
<div>777-777-7777</div>
<a href="http://mysite.ru/">Personal website</a>
</div>
The hCard microformat allows you to make each code block semantically meaningful:
<div class="vcard">
<div class="fn">Petr Petrov</div>
<div class="org">LLC ConstructionInvest</div>
<div class="tel">777-777-7777</div>
<a class="url" href="http://mysite.ru/">Personal website</a>
</div>
The content of the code elements remained the same, but the addition of attributes allowed specifying where exactly in the block the person's contact information is located. Browser plugins allow users to add content marked up with microformats to their address books, calendars, and other applications.
Types of Microformats
The most commonly used microformats are:
hCard - people and companies,
hCalendar - events,
hAtom - news feeds in regular (X)HTML, analogs of Atom and RSS,
XFN - social relationships,
geo - geographic coordinates,
rel-tag - tags and folksonomies,
adr - postal addresses,
hReview - reviews of products, services, events, etc.,
hProduct - any products,
hRecipe - culinary recipes,
xFolk - bookmarked links,
nofollow - an attribute that prohibits search engine crawlers from indexing documents.
|