网页
综合
更新时间 2026-11-13 20:14:36
Microformats : Meaningful HTML
自动蜘蛛
microformats.io
正文约 1481 字
Microformats are a simple way to add more meaning to your HTML.
It's easy! You probably already know how. It's just classes.
This snippet of HTML is very common. While you as a human can recognize that is contact information, computers could use a few hints to understand it.
By adding just a few HTML classes, you can turn this generic markup into much more meaningful and semantic HTML.
Or an even simpler example is just link.
All it needs is one h-card class on the link tag.
By adding Microformats to your HTML, your website becomes more understandable to various kinds of computers.
In addition to people and organizations, Microformats can be used for: feeds, blog posts, events, locations, reviews, recipes, resumes, and products.
Microformats are fully specced with a comprehensive test suite and are licensed as Public Domain allowing you to freely use them however you want.
If you're a developer working on an app or service, you probably need JSON as your input format. Don't worry. There are several Microformats parsers written in multiple programming languages. A parser will take a URL or a glob of HTML, understand it, then convert it to JSON for your use.
You can test your URL here (or HTML snippet on any of the parser sites).
Production ready parsers are available for: Go, Node, PHP, Python, Ruby.
Other parsers are in-development for: Erlang, Elixir, Haskell, Java, and more.
This is a simple h-card example.
It will be converted into this JSON by a parser.
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。