Join James Williamson for an in-depth discussion in this video Microformats and hCard, part of HTML: Structured Data.
- We'll begin our exploration of structured data by using one of the oldest syntaxes available, and that's microformats, which you can explore here at their site, http://microformats.org Here you can check out their blog for the latest information, head to the wiki to read more about microformats and check out some code examples, and tools that are designed to help you write in microformats. Now before we get too deep into microformats, I wanna show you what we're gonna be working on in this course. Our excercises are gonna be centered on taking content from an existing site, and adding structured data to it.
We're gonna be using this fictitious H+ Sport brand site. Now we're gonna add structured data for contacts, events, products, and general company info. Because we're adding markup design primarily from machines, we're not really gonna see any physical differences between our starting and our finished files. Along the way, however, we're gonna test these files, so that you can actually see the effects of the data that you've added. For our first chapter, we're gonna markup personal contact information, using microformat's h-card format.
H-card is one of the oldest and most established structured data formats available. It's essentially an HTML enabled representation of the vCard format, which was established to create electronic business cards. We're gonna be using the latest version of the h-card syntax, which is the h-card format, found in the microformats 2.0 specification. To add h-card structured data to our pages, we're gonna reference the h-card draft specification that you see here, which is found in the microformats.org site.
Now before we get started, I first wanna clarify a point. Although we will be using microformats to add contact info, that doesn't mean that I'm saying it's the best choice for the job. As we mentioned earlier, there are a number of syntaxes and vocabularies that would be appropriate. Because I feel that there's a tremendous amount of value in experimenting with various syntaxes, we're gonna use different syntaxes in each chapter. That way, you'll get a feel for how they all work, and how they all might fit in your own projects.
- Choosing a syntax
- Learning microformats
- Structuring contact data
- Adding contact names, titles, photos, and addresses
- Learning RDFa
- Structuring event data
- Providing event dates
- Adding an event URL
- Learning microdata
- Structuring products
- Setting product pricing
- Adding individual product reviews
- Learning JSON-LD
- Creating a knowledge graph