Aller au contenu principal
YouTube videos: links and embeds in Markdown posts
Media

YouTube videos: links and embeds in Markdown posts

1 minParcours GuidesDomaine MediaLangue en
  • YouTube
  • Markdown
  • Video
  • Accessibility
SMD LABTECH;
SMD LABTECH
Publié le
Lire en français

YouTube videos: links and embeds in Markdown posts

Two complementary options: a link (opens YouTube) and an embed to watch inline.

Simple link

Open the sample video on YouTube

Embedded player (iframe)

The player below uses the official embed URL (youtube.com/embed/...). The app only renders allowlisted YouTube iframes.

Production notes

  • Review Content-Security-Policy if you lock down frame-src: allow https://www.youtube.com and optionally https://www.youtube-nocookie.com.
  • Provide a clear title on the iframe for assistive technologies.

Conclusion

Use links for sharing and lightweight pages, and embeds when you want an immersive in-page experience.