of the semantics of

Posted by Publicado por MrHardWork On jueves, enero 07, 2010

f that was all microformats did, then it wouldn't be very interesting. Instead, microformats make use of the semantics of existing HTML elements to explain where the encoded data can be found. In this example everything is a , but it doesn't have to be. This is what makes extracting data from the HTML slightly more difficult for parsers, but makes it easier for publisher. Microformats do not force publishers to change their current HTML structure or publishing behavior. At the end of the day, there will be factors of 10 more people writing HTML than writing parsers, so why not make it as easy as possible for the publishers?

It bugs me when I look at the previous XML example and see "Brian Suda" encoded twice, once for FN then repeated again for N. With HTML this isn't a problem, we can combine those two XML elements using space-separated values in the class attribute. It is a little know fact that the class, rel, and rev attributes in HTML can actually take a space-separated list of values. If we combine the FN and N we get something like this: