How to embed a YouTube video into Markdown?

There are different ways to embed a YouTube video in Markdown documents.

If the Markdown processor supports inline HTML, a YouTube player can be embedded using an iframe:

<iframe
  width="640"
  height="480"
  src="https://www.youtube.com/embed/UmX4kyB2wfg"
  frameborder="0"
  allow="autoplay; encrypted-media"
  allowfullscreen
>
</iframe>

If the Markdown processor does not support inline HTML, the only way to add a video is to add an image that links to the video. You can use your own image or the thumbnail generated by YouTube. YouTube provides the following thumbnails for each video:

URLDescription
https://img.youtube.com/vi/VIDEO_ID/0.jpg Full-size thumbnail
https://img.youtube.com/vi/VIDEO_ID/1.jpg, https://img.youtube.com/vi/VIDEO_ID/2.jpg, https://img.youtube.com/vi/VIDEO_ID/3.jpg Small thumbnail images
https://img.youtube.com/vi/VIDEO_ID/default.jpg Default thumbnail image
https://img.youtube.com/vi/VIDEO_ID/hqdefault.jpg High-quality default thumbnail image
https://img.youtube.com/vi/VIDEO_ID/mqdefault.jpg Medium-quality default thumbnail image
https://img.youtube.com/vi/VIDEO_ID/sddefault.jpg Standard-definition default thumbnail image
https://img.youtube.com/vi/VIDEO_ID/maxresdefault.jpg Maximum-resolution default thumbnail image

Additionally, i.ytimg.com can be used in place of img.youtube.com in all of the URLs listed above.

Using one of the thumbnails, it is possible to add a link with a still from a video, e.g.:

[![IMAGE_ALT](https://img.youtube.com/vi/UmX4kyB2wfg/0.jpg)](https://www.youtube.com/watch?v=UmX4kyB2wfg)

See also

Leskoff phonetics IPA Transcription Poster image
phonetics IPA Transcription Poster
$14.99

A poster featuring the phonetic transcription of "phonetics" in the International Phonetic Alphabet (IPA).

Leskoff β-Alanine Molecule Poster image
β-Alanine Molecule Poster, Ball-and-Stick Model, Stylized, English-Labeled
$19.99

A poster featuring the ball-and-stick model (stylized) of the β-alanine molecule.

Leskoff Normal Distribution Poster image
Normal Distribution Poster, English-Labeled
$13.99

A poster featuring a plot of the normal distribution.

Markdown Editor

A simple online editor for Markdown files.

Dinka Word of the Day

Discover a new Dinka word every day.

Mongolian Word of the Day

Discover a new Mongolian word every day.

ABAP Editor

A simple online editor for ABAP code.

Chemical elements in Basque

The list of names of chemical elements in the Basque language.

All prices listed are in United States Dollars (USD). Visual representations of products are intended for illustrative purposes. Actual products may exhibit variations in color, texture, or other characteristics inherent to the manufacturing process. The products' design and underlying technology are protected by applicable intellectual property laws. Unauthorized reproduction or distribution is prohibited.