<entry-title>h-entry</entry-title> Tantek Çelik (Editor)
h-entry is a simple, open format for episodic or datestamped content on the web. h-entry is often used with content intended to be syndicated, e.g. blog posts. h-entry is one of several open microformat draft standards suitable for embedding data in HTML/HTML5.
Here is a simple blog post example:
<article class="h-entry"> <h1 class="p-name">Microformats are amazing</h1> <p>Published by <a class="p-author h-card">W. Developer</a> on <time class="dt-published" datetime="2013-06-13T12:00:00">13<sup>th</sup> June 2013</time> <p class="p-summary">In which I extoll the virtues of using microformats.</p> <div class="e-content"> <p>Blah blah blah</p> </div> </article>
h-entry is a root class name that indicates the presence of an h-entry.
p-name, p-author, dt-published and the other h-entry property classnames listed below define properties of the h-entry.
See microformats2 parsing specification to learn more about property classnames.
h-entry properties, inside an element with class h-entry:
p-name- entry name/title
p-summary- short entry summary
e-content- full content of the entry
dt-published- when the entry was published
dt-updated- when the entry was updated
p-author- who wrote the entry, optionally embedded h-card(s)
p-category- entry categories/tags
u-url- entry permalink URL
u-uid- unique entry ID
p-geo- geophysical location the entry was posted from, optionally embed h-geoMain article: h-geo
p-latitude- decimal latitude
p-longitude- decimal longitude
p-altitude- decimal altitude
The following experimental properties are in use in the wild but are not yet part of the spec:
u-in-reply-to- the URL which the h-entry is considered a reply to or comment on.
- Potentially optionally an embedded (or nested?) h-entry (for reply contexts) but I’m the only one doing that right now so not considered a recommendation --bw 16:44, 13 June 2013 (UTC)
p-comment- optionally embedded (or nested?) h-entry(ies), each of which is a comment on/reply to the parent h-entry. See Brainstorming for a Comment Microformat.
The following properties are proposed additions based on various existing link preview markup conventions which are not yet used in the wild (Related: link-preview-brainstorming)
u-audio- consider special u- parsing rules for
u-video- consider special u- parsing rules for
All properties are optional.
h-entry is a microformats.org draft specification. Public discussion on h-entry takes place on h-entry-issues, the #microformats #microformats on freenode channel on irc.freenode.net, and microformats-new mailing list.
h-entry is ready to use and implemented in the wild, but for backwards compatibility you should also mark h-entries up as classic hAtom 0.1 entries.
(stub, to be expanded)
hAtom-specific implementations that perform custom display or translation (e.g. to Atom XML) SHOULD prefer
p-entry-title, and use
p-entry-title value(s) as a fallback if there is no
- What is the
p-nameof a note?
- A few options, from simplest to most detailed.
- same as the p-content/e-content property.
- same as the
titleelement on the note permalink post page. When publishing a note on its own permalink post page, the contents of the note are likely abbreviated for the title of the page. The same abbreviation can be used for the p-name.
- first sentence of the p-content/e-content property. It may be better for syndication and link-preview purposes to provide just the first sentence of the note as the
p-name. Similarly if only a portion of the content is syndicated to other sites, that portion can be marked up as the
- A few options, from simplest to most detailed.
Examples in the wild
Real world in the wild examples:
- ... add uses of h-entry you see in the wild here.
- The Twitter archive browser UI uses h-entry and h-card internally, unfortunately it’s not exposed as HTML in static files anywhere
- Brett Comnes marks up his posts with h-entry and h-card (example)
- Ben Werdmuller marks up his posts with h-card and h-entry, u-in-reply-to and u-like (example)
- Sandeep Shetty marks his posts up with h-card and h-entry, as well as draft u-in-reply-to and experimental u-like properties (example)
- spreadly marks up share permalink pages with h-entry, as well as minimal h-cards and experimental p-like properties (example)
- Laurent Eschenauer marks up his posts with h-entry (example)
- Tom Morris marks up his posts using h-entry (example)
- Numerous newer W3C specs, e.g.
- SemPress is a WordPress theme that supports h-card, h-feed/h-entry.
- The Pastry Box Project use h-card and h-entry markup on their homepage and individual thoughts pages
- Aaron Parecki uses h-entry to mark up notes, e.g. 2012/230/reply/1.
- Tantek Çelik uses h-entry on his home page, as well as h-entry on all post permalinks, e.g. 2012-243 post, with rel-prev/rel-next (if applicable) to indicate prev/next posts
- Barnaby Walters uses h-entry on all notes and articles, as well as nested within notes as reply contexts example and comments example.
Test and validate microformats2 markup in general with:
- https://pin13.net/mf2/ - enter your markup directly
- https://pin13.net/ - enter a URL to a page to test where it says "Microformats Parser"
For backward compatibility, you may wish to use classic hAtom 0.1 classnames in addition to the more future-proof h-entry properties, for example:
<div class="h-entry hentry"> <h1 class="p-name entry-title">My great blog post</h1> </div>
Microformats parsers should detect classic properties and parse them as microformats2 properties. If an "h-entry" is found, don't look for an "hentry" on the same element.
Compat root class name:
Properties: (parsed as p- plain text unless otherwise specified):
entry-title- parse as
entry-summary- parse as
entry-content- parse as
published- parse as dt-
updated- parse as dt-
author- including compat root
vcardin the absence of
geo- parse as
p-geo h-geoincluding compat root