metaformats-brainstorming
This page is for documenting brainstorming related to the metaformats.
Which HTML tags
See https://html.spec.whatwg.org/#metadata-content for tags to consider.
meta
The meta
, obviously, for Open Graph Protocol and Twitter Cards at least. Are there any others?
- Only in the
head
? - Or should we specify how to parse meta tags in the
body
as well?- Do any existing consuming code (that supports meta in the
head
) do anything with meta tags in thebody
?
- Do any existing consuming code (that supports meta in the
Which attributes on meta
class
The meta tag does support the class attribute, but should we use it?
name
The HTML specification defines the meta name attribute: https://html.spec.whatwg.org/#attr-meta-name
If a meta element has a name attribute, it sets document metadata.
This implies that absent a name attribute, a meta element does not set document metadata. Thus if microformats are to support parsing metadata from meta elements in a manner compatible with what HTML requires, microformats must use the name
attribute.
Document metadata is expressed in terms of name-value pairs, the name attribute on the meta element giving the name … The name specifies what aspect of metadata is being set; …
Since microformats has the similar model of name/value pairs in the form of properties and values, microformats should use the name
attribute to express property semantics to follow this portion of the HTML specification.
As a fallback, should microformats also allow using the class
attribute on meta tags? Or at least specify what should happen if it is present?
content
The HTML specification defines the meta content attribute: https://html.spec.whatwg.org/#attr-meta-content
Document metadata is expressed in terms of name-value pairs, … the content attribute on the same element giving the value. … valid names and the meaning of their values are described in the following sections. If a meta element has no content attribute, then the value part of the metadata name-value pair is the empty string.
property
Only for backcompat with Open Graph Protocol.