Home
Home Page
Than differ id and class
Creation WAP of a page
Passions around AJAX are heated
Answers to often asked questions on XHTML and HTML
The sanction of the screen and marking of pages
Two styles ajax'?
Business Macromedia lives
XHTML+CSS. Advantages are obvious
Microformats
The semantic network based on microformats
Fonts and CSS
CSS from And up to I
Properties of the text
Illumination of the link
Change of a background in the table
Fixation of fonts on page with the help of the table of styles
Krossbrauzernoe alignment on the center
Polling with help AJAX
HTML
Links
 

Microformats

Recently the site microformats.org on which are collected has opened and will razivavat`sja is deserved microformats typing{collecting} nowadays a fashion. They were thought up djad`ka by name Tantek Selik which, by the way, in due time has made a cursor makintoshnogo IE, by the most innovative for time. Microformats - idea ingenious, I want to write about them in detail.



Restrictions of semantics XHTML


I shall start, as it is usual, from apart. XHTML (or HTML, that while is unimportant) - language interesting. One of interesnostej consists that this language which has been thought up for the description of structure of documents on a web, possesses also semantics.


Speaking Russian, semantics in this case is officially certain sense of a concrete element. For example, the element means amplification{strengthening} of a part of the text, an element - the even greater amplification{strengthening}, - a code of the computer program. That is all these elements possess certain semantics. There are also elements which do not possess any semantics. For example elements <i> or <b>. As against and they do not mean any amplification{strengthening} of the importance of the text but only show, that these elements should be displayed by italics and a fat font.


That it is better to understand a difference, try to present, that page the user of a graphic browser, and, say, "reads" not a search cursor. To him, in general, to spit, as the page looks, but he can benefit by semantics which is born{carried} in themselves with elements. For example, it is possible to imagine specialized poiskovik which searches for a computer code. If he will meet:


int i = 0;


He will understand that, what is it a code. And if


int i = 0;


That will not understand.


Now, actually, to a subject of this chapter{head}. Semantics (X) HTML'? has serious restrictions: actually, semantic elements available in him very well approach only for the description of technical documentation. And for the description, say, restaurant ratings, poetry, the price-lists, special semantics at him{it} no. Therefore, all these things are described only by human words and registration, and it means, that mashinno them to process it is impossible.


Again an example. We shall take those restaurant ratings. If you need to find restaurant, you can go in poiskovik, find there a couple (tens) sites by words ” a restaurant rating “ and see{overlook} a little liked you. And, on each site there will be a design, the navigation, the information there will repeat and contradict to each other. Itself recently in it was engaged, and I shall notice, that process rather unpleasant:-). And now present, it was as though good, if restaurant ratings were made out with the help of the certain and known elements specially intended for the description of the necessary fields: the name of an institution, a site, a rating on a five-ball scale, the author of the review, date of the review … Then poiskovik could index itself all this and represent in a uniform summary kind, calculate an average dancing party from different reviews and give still any service.


However, is and a working example. It is a Yandex. A market which just gives universal search under price-lists of the every possible goods of every possible firms. However, he searches not on a web. Internet - shops give him the information on the goods and the prices as the separate structured XML-documents which format specially on it is sharpened.



Advantages of microformats


The approach which works for a Yandex, works only in a situation when from both parties{sides} - and agregatora information, and the content - provider - there is organized enough business. Aggregation of such volumes of the data demands, probably, rather big technical and org. Resources, and granting of the actual price-list assumes presence of any minimal DB and a control system of this facilities{economy}.


But power of the Internet is opened when his{its} each participant, from the schoolboy up to corporation can bring in the information contribution. Also it is one of the basic ideas underlying microformats. Instead of inventing the separate format for each area in which it would be interesting mashinno to process the information, their founders have decided to expand itself (X) HTML structure the information any who can lay out the page in a network could.


However, the highlight consists in that, how they have expanded language. In fact it is simple so new tegov or new attributes to add will fail: it will be any more (X) HTML, and existing clients will cease to process it{him} normally: browsers and tulzy everyones. However, fortunately at (X) HTML'? there was a pair places which the standard suppose expansions. These are attributes rel and class.


The attribute rel is at links, and both at usual <a>, and at less known. He is intended to show "type" of this link. For example, to show, that for your document there is a table of styles, you include in him{it}, or, for example, if he{it} has alternative performance in format Atom. Or if give the key link to clause{article} bloga to show, that she a constant, write <a href = "..." rel = "bookmark">.


The attribute class is intended for free marks of elements for any purposes. Certainly, more often he is used that to several elements on page to apply any general{common} styles. But it can be used also, say, for skriptovanija. For example, it is possible to be run by a script on elements of the list, and at what costs{stands} opredennyj a class, to add the button of turning.


And so, authors of microformats as a matter of fact only establish completely concrete values for class'ov and rel'ov, attributing them{him;it} concrete sense which can be used at machining



Pair examples of microformats


Have gathered, for example, people and have said, that henceforth if the link in attribute rel has value friend, it means the link to a personal page of your friend (or, more precisely, on a page which as you consider, well describes it{him}). And if there costs{stands} met, means you met this person personally. And many other cheerful values. Now all this the thought up set is called as them XFN. And now on rubhub it is possible is centralized to learn{find out} about attitudes{relations} with each other everyones known and not so people.


Other example. For reviews and ratings have thought up a microformat hReview. Now, if you write the description of how you descended{went} with friends in a McDonalds and as it was pleasant to you:

Descended{Went} in a McDonalds

Descended{Went} last night for the first time in a life in a McDonalds,

All was class!.

...

The author: Vasja Pupkin


That to transform it in hReview and to give poiskovikam to switch on it in any summary rating, it is necessary to register simply in pair places the necessary classes and to attribute to human words machine-readable values:


Descended{Went} in a McDonalds

Descended{Went} last night for the first time

In a life in a McDonalds, all was class!

.

...

The author: Vasja Pupkin



And, from the point of view of a graphic browser has not changed practically anything! I do not know, how you, and I am admired simply with beauty of the decision. Especially in fine details when human "last night" with the help native XHTML'nogo an element machine-readable value of time in rigid format ISO is given.

About "oficial`nosti"


Now a question. And why, actually, everyone should use these values? And why any other person cannot think up the? In total only because at founders XFN'? and other microformats have sufficed popularity, communications{connections} and common sense to make this thing convenient known and used. For example, the same XFN is already maintained in system of links of blog-system WordPress and in HTML-editor Nvu.


That is, basically, you can and not adhere to these values or invent the, but when already there are well organized and giving concrete results movement on development to think out alternative bicycles simply there is no need. More than if you have good idea to that in these formats it is possible to add or change it now can be discussed within the framework of the project of microformats.

Some adjacent problems


One of problems (in my opinion) microformats consists that authors have decided to define{determine} them only for XHTML, but not for HTML. And, it is very much proved, because all sense XHTML'?, as pereformulirovanija HTML'? in XML'nom syntax, was just in facilitating his{its} machining. However, in practice it means, what not any existing page can be grinded easily under any microformat, all over again it is necessary to achieve that she was, at least, well-formed XML'om.


Other problem - general for all efforts to introduce on a web semantics. To the authors who have got used, that the web - page is that shows their liked browser, it is very difficult to explain at times, that there is a benefit of that they will use semantic elements there where it is necessary. And, difficulty not that authors "bad", and in that, what is it demands much more efforts, and benefit is shown not at once. It is more than that - even it is not yet known whether to be shown she really. In fact while authors do not do{make} much semanticheski correct pages, founders potential tulzov and services which could use semantics, will not create them because to work simply there is nothing. That is, a classical problem ” eggs and chicken “. However, there is a hope, that efforts of large enthusiasts in the person microformats.org and Google, a train all taki will go away. At least, I hope to find this interesting time:-). For now, I shall go, I shall impose a page ” About the author “ for this site, using a microformat hCard …