DEV Community

Harit Himanshu
Harit Himanshu

Posted on

How do I embed YouTube videos?

Hello

Is there a way to embed YouTube videos here in the post?

Thanks

Top comments (7)

Collapse
 
geraalcantara profile image
Gerardo Alcantara • Edited

All you need is the id from the URL

YouTube: {
% youtube dQw4w9WgXcQ %
}
Vimeo: {
% vimeo 193110695 %
}

Write all in one line so it works from { to }

I'm a Code 🐒

Collapse
 
davidmm1707 profile image
David MM👨🏻‍💻

Thanks!

Collapse
 
zelal profile image
Zelal Hossain

thanks

Collapse
 
tham profile image
Tham

I am not able to use the suggestion below. Can you add some more detail on the below suggestion?

Collapse
 
rolandixor profile image
Roland Taylor

Hi, the issue is how the example was formatted. It's confusing.

Here's the correct method:

{% youtube ID %}
Enter fullscreen mode Exit fullscreen mode
Collapse
 
robsoncassiano-software profile image
Robson Cassiano

Thanks

Collapse
 
thiagoow profile image
Thiago Silva Lopes

Thank you a lot mate!