网页 综合 更新时间 2026-11-13 20:14:18

microformats2 - Microformats Wiki

自动蜘蛛 microformats.org 正文约 5071 字
Welcome to the microformats2 home page.
Microformats2 is the latest version of microformats, the simplest way to markup structured information in HTML. Microformats2 improves ease of use and implementation for both authors (publishers) and developers (parser implementers).
Microformats2 replaces and supersedes both classic microformats (sometimes called microformats1), as well as incorporates lessons learned from microdata and RDFa.
Here are a few simple microformats2 examples along with canonical JSON.
Additional simple cases details in microformats-2-implied-properties.
Details demonstrated by the examples:
microformats2 has the following key design aspects:
See microformats2-prefixes for more details.
Parsing each prefix (including generating canonical JSON) is detailed step-by-step in:
Note: Most properties are specified and used with a single specific prefix (or occasionally two or three) that is self-evident from context. However, any parsing prefix can be used with any property, especially if you find a good reason to do so!
Status: draft. Please review and provide feedback in IRC.
See below for vocabulary summaries.
The h-adr microformat is for marking up structured locations such as addresses, physical and/or postal. This is an update to adr.
root class name: h-adr profile/itemtype: http://microformats.org/profile/h-adr
For backward compatibility, microformats2 parsers SHOULD detect the following root class name and property names. A microformats2 parser may use existing classic microformats parsers to extract these properties. If an "h-adr" is found, don't look for an "adr" on the same element.
compat root class name: adr properties: (parsed as p- plain text unless otherwise specified)
The h-card microformat is for marking up people and organizations. This is an update to hCard.
root class name: h-card profile/itemtype: http://microformats.org/profile/h-card
Reserved properties: (properties not used much (if at all) in practice)
For backward compatibility, microformats2 parsers SHOULD detect the following root class name and property names. A microformats2 parser may use existing classic microformats parsers to extract these properties. If an "h-card" is found, don't look for a "vcard" on the same element.
compat root class name: vcard properties: (parsed as p- plain text unless otherwise specified)
Reserved: (backward compat properties that parsers MAY implement, if they do, they MUST implement in this way:
Note: use of 'value' within 'tel' should be automatically handled by the support of the value-class-pattern. And for now, the 'type' subproperty of 'tel' is dropped/ignored. If there is demonstrable documented need for additional tel types (e.g. fax), we can introduce new flat properties as needed (e.g. p-tel-fax).
The h-entry microformat is for marking up syndicatable content such as blog posts, notes, articles, comments, photos and similar. This is an update to hAtom.
root class name: h-entry profile/itemtype: http://microformats.org/profile/h-entry
This is an update to hAtom.
The following properties are proposed additions to h-entry above and beyond what hAtom (or Atom) provides, based on various existing link preview markup conventions:
Backward compatibility:
(*)hAtom-specific implementations that perform custom display or translation (e.g. to Atom XML) SHOULD prefer p-name over p-entry-title, and use p-entry-title value(s) as a fallback if there is no p-name.
For hAtom backward compatibility, microformats2 parsers SHOULD detect the following root class name and property names. A microformats2 parser may use existing classic microformats parsers to extract these properties. If an "h-entry" is found, don't look for a "hentry" on the same element.
compat root class name: hentry properties: (parsed as p- plain text unless otherwise specified)
The h-event microformat is for marking up events. This is an update to hCalendar.
root class name: h-event profile/itemtype: http://microformats.org/profile/h-event
This is an update to hCalendar.
(*)hCalendar-specific implementations that perform custom display or translation (e.g. to iCalendar .ics) SHOULD prefer p-name over p-summary, and use p-summary value(s) as a fallback if there is no p-name.
For backward compatibility, microformats2 parsers SHOULD detect the following root class name and property names. A microformats2 parser may use existing classic microformats parsers to extract these properties. If an "h-event" is found, don't look for a "vevent" on the same element.
compat root class name: vevent properties: (parsed as p- plain text unless otherwise specified)
The h-geo microformat is for marking up WGS84 geophysical coordinates. This is an update to geo.
root class name: h-geo profile/itemtype: http://microformats.org/profile/h-geo
For backward compatibility, microformats2 parsers SHOULD detect the following root class name and property names. A microformats2 parser may use existing classic microformats parsers to extract these properties. If an "h-geo" is found, don't look for an "geo" on the same element.
访问原文 返回搜索 https://microformats.org/wiki/microformats2
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。