If you ever want to embed a YouTube video within your blog post, just follow along with this blog post.
It’s an easy thing to do and just takes less than a minute to accomplish!
Related: How to embed code snippet using GitHub Gist ( opens in a new tab )
Steps to embed a YouTube video
- Go to the video that you want to embed.
- Click on the ‘Share’ button
- Select ‘Embed’ and copy the HTML code that’s given there
- Now get back to your blog/website and just paste the code (in your HTML view/Raw view – not directly where you write the blog post because we don’t want to have any formatting done to the code.
- Important: now this step is vital for your video to show up without any issues. After pasting the iframe code, between the two <iframe> tags, type something (I usually type “video” – without the quotes, of course). This is important or the video might not show up sometimes.
That’s all. This is how you embed a YouTube video within your blog post!
If you want to customize how your video preview looks, you can do so here:
Please leave your comment or questions related to this in the comments section below.