Microformats in HTML 5

(Difference between revisions)

Jump to: navigation, search
(microdata: updated attribute definitions and uses, changed microdata vocabulary links to working versions, removed out-of-date warnings about using microdata vocabularies)
m (microdata: fixed itemref presentation, added example)
Line 18: Line 18:
* <code>itemprop</code> attribute is a more specific version of <code>class</code>, for field names
* <code>itemprop</code> attribute is a more specific version of <code>class</code>, for field names
* <del><code>subject</code> attribute allows semantically linking within the page. Conceptually similar to the [[include-pattern]].</del>
* <del><code>subject</code> attribute allows semantically linking within the page. Conceptually similar to the [[include-pattern]].</del>
-
* <code>&lt;itemref="" /&gt;</code> allows including properties elsewhere on the page that are not descendants of <code>itemscope</code>. Takes space-separated ids. Conceptually similar to the [[include-pattern]].
+
* <code>itemref</code> attribute allows including properties elsewhere on the page that are not descendants of <code>itemscope</code>. Takes space-separated ids (for example <code>itemref="address phone"</code> would include the elements with <code>id="address"</code> and <code>id="phone"</code>). Conceptually similar to the [[include-pattern]].
* <code>content</code> attribute on the <code>meta</code> element can be used to include data that is not part of the content. As current browsers move <code>meta</code> inside <code>&lt;head&gt;</code>, make sure to include via <code>itemref</code>. Conceptually similar to the [[value-class-pattern]].
* <code>content</code> attribute on the <code>meta</code> element can be used to include data that is not part of the content. As current browsers move <code>meta</code> inside <code>&lt;head&gt;</code>, make sure to include via <code>itemref</code>. Conceptually similar to the [[value-class-pattern]].
* <code>itemscope</code> attribute identifies blocks to be marked as structured data. Conceptually similar to the [[mfo]] brainstorming?
* <code>itemscope</code> attribute identifies blocks to be marked as structured data. Conceptually similar to the [[mfo]] brainstorming?

Revision as of 14:51, 12 July 2010


This page is to document future use of microformats in HTML 5. None of the items documented are supported now, and may change upon proper development within the microformats community, or changes in the HTML 5 specification. This page is to track HTML5 enabled enhancements to microformats, and issues that HTML5 raises. It may be used to track issues which we need to push back into the HTML 5 development process.

If there are things that Microformats would like to mark up that aren't handled by HTML5 explicitly, please let the WHATWG know, so we can improve HTML5. This is how time came to be, for instance.

Contents

New features in HTML5

time element

time element for representing date times. In HTML5, the machine form of datetimes can be represented natively. It should be possible to replace the date-time design pattern with native HTML.

article element

article element for major, independent compositions of content within a page. Perhaps synonymous with hAtom hentry. Could be parsed as hentry within explicit hfeed blocks?

microdata

microdata. HTML5 provides a set of attributes and associated DOM APIs for extracting data from web pages.

microdata vocabularies

data attributes

data- naming convention for tag attributes. the draft specification states that any attribute that starts with "data-" will be treated as a storage area for private data.

Current microformat compatibility

There seems to be no issue with current implementation of the following microformats in HTML 5:

Requests

Issues

  • The rev attribute has been removed. In HTML5, rel and rev are no-longer paired, and the rel attribute nolonger describes the direction of a relationship. Microformats which use rev will need to use rel instead.
    • Or something like data-rev="vote-for"
      • As above, data- attributes are for application-context functionality, not shared vocabularies. Further, the HTML5 specification makes rel the correct attribute to use, regardless of direction, through the changed specification. --BenWard 17:53, 12 May 2009 (UTC)
  • The profile attribute has been removed. In HTML, the profile attribute from the head has been removed, with no direct replacement. This causes issues for GRDDL support. It's been suggested that profile URLs be represented in link elements instead, or even as a custom HTTP header. See grddl and profile-uris
    • See rel-profile which is the replacement for the profile attribute. Tantek 23:24, 5 November 2009 (UTC)
  • Microdata itemprop duplicates class data. the new attribute itemprop is designed to hold some meaningful data about an element, but class already exists to hold this data. Unsure of reasons why itemprop required?
    • This is because microdata is designed to be generically parsable, even when the parser does not understand the vocabulary. As such, property names have to be on an explicit attribute, not shared with other, non-data classnames. --BenWard 21:12, 4 September 2009 (UTC)
  • The recommended removal of the colon in timezone doesn’t validate The relevant uF wiki text is “However the colons ":" separating the hours and minutes of any timezone offset are optional and discouraged in order to make it less likely that a timezone offset will be confused for a time.” ref: HTML5 time microsyntax for <time> --Oli 14:40, 14 February 2010 (+9)

see also

Microformats in HTML 5 was last modified: Wednesday, December 31st, 1969

Views