We just discussed the semantic web, and how it has so much potential to explode SEO. Now that all sounded well and good, but with a moment’s reflection, I’m sure you’ll agree that the devil is in the details.
That is, the theory is very nice, but how do you make semantic web happen in practice?
That’s an excellent question, and here’s one answer…
The semantic web can be partly built using a simple technology called “microformats.”
You don’t need to know very much about microformats to use hRecipe correctly. If you know a little bit about HTML and CSS, microformats are just CSS classes that “mean something.” If you don’t know any CSS or HTML, just skip over the explanation and follow the instructions very carefully.
Microformat definition in a paragraph
The notion of a microformat is that meaning can be embedded in the CSS class of an HTML element. For example, a block of HTML such as a div or fieldset can be styled as an “hCard” or an “hRecipe” (The leading “h” is a convention within the microformatting community, irrelevant for our discussion). The hRecipe CSS class then defines how all the HTML is laid out visually… but can also be used by a web page scraper to regard that entire HTML block as a recipe. Given that everyone wants to make recipes pretty, it costs nothing to name the styling classes semantically.
Knowing a little bit about the hRecipe microformat in particular will be very helpful, whether or not you understand HTML and CSS.
hRecipe microformat specification
The hRecipe microformat specification allows for lists of ingredients and steps for directions. A correctly formatted recipe could allow someone to count the number of ingredients automatically, and the amount of ingredients as well. Suppose you put a recipe on your web page that serves 4 people. If you used hRecipe formatting, someone else could determine, automatically, the amount of ingredients to serve 8, 12, or more people. While such software hasn’t yet been written, it’s nearly impossible to write without using a microformat such as hRecipe.
Intermission: Let’s eat!
While we’re on the topic of recipes, “I’m Just Here for the Food” is one of my favorite cookbooks. This is partly because I’m over-educated and relish Alton Brown’s technical explanations… but it’s also an appreciation for his ability to render complicated processes such heat transfer into language anyone can understand.
For example, I learned why smoking meat works really well, and some great tips for doing my own smoking which I used at the “Thrill of the Grill” Super Tuesday Party last year. I’d found a huge brisket on sale for a ridiculously low price (under $1/lb), and it had been sitting in my freezer for months. Thanks to Alton Brown, we had a smash hit on our hands! But there’s more, lots more, so if grilling or smoking isn’t your thing, there’s plenty about roasting and baking and more.
Back to our regularly scheduled programming…
Easy on users is hard on programmers
I admit it. I’m a unix geek. I love the command line.
But most people don’t, and truthfully, I like visually-oriented systems like WordPress a whole lot too.
As it turns out, making things visual and very easy for users is much more difficult for programmers. What we’re going to have to do here is split the difference:
I’ll do my best – with the little time I have – to make it easy for you, you will have to learn a tiny amount of technology.
We’ll both win.
You really don’t need to learn much, but understanding these two important rules for the hRecipe microformat is, well, important:
- Each ingredient is tagged.
- Each step in the instructions is tagged.
That doesn’t make any sense yet, does it?
It’s time to peel back the onion, one more layer, and show exactly what happens on your web page page when you use hRecipe.
NOTE: At the end of this series of articles there will be a “formatting cheat sheet” for easy reference, which will be linked from all the pages in this series.
I’m Just Here for the Food. What are you here for?








