embed

From IndieWeb
Jump to: navigation, search


embed is code (usually just HTML like an iframe, sometimes with JS) for showing content from another website on your website or inside a post that is included by viewer’s browser and typically has some interactive aspect (more than just a static image / audio / video file).

Why

There are lots of reasons to embed content (transclude if you fancy yourself a fancy hypertexter) from another website into your posts. E.g.

  • Add a CC-licensed image from Flickr to your post to illustrate a point
  • ...

How to

  • At a minimum, just use the recommended iframe or similar markup recommended by the person (or service) publishing the original content you want to embed.
  • If you want to explicitly mark up your embeds for discovery, indexing, etc., use h-cite to to indicate the presence of the embed, with at least a u-url on the element that does the literal embedding of the content, e.g. img or iframe.

(actual minimal HTML + h-cite example would be good here)

WARNING:

  • DO NOT use properties like u-photo or u-video on an embedding element without wrapping it in an h-cite. Doing so associates that content directly with your own h-entry, which presumably lists you as a p-author, thereby erroneously claiming that you took and/or own the content being embedded which is unlikely if you are embedding it from another site.

See Also