8. 12. 2023
Youtube přehrávač

How to embed a YouTube video on the web

Surely you have already come across an article or website that had a Youtube video player embedded in its content. Inserting such a Youtube player into the content of your own site is not difficult at all and in a few steps, everyone can do it.

Get HTML code of video player – iframe

  1. First, we go directly to Youtube to the page with the video we want to embed.
  2. Then click on the Sharing link below the video
Sdílení Youtube videa
Share Youtube videos

3. A window will open, where we will select the Insert option

Okno pro sdílení Youtube videa
Youtube video sharing window

4. Then we will see the HTML code that needs to be copied.

HTML kód iframe pro vložení Youtube přehrávače
HTML iframe code for embedding Youtube player

Embed HTML code in a web page

The HTML code that we copied can then be pasted into the content of the website, for example through its administration. Editors that are available in modern administrations usually already have the option to insert HTML code. In the case of the classic WordPress wysiwyg editor, all we have to do is switch to the HTML tab and then just paste the copied code to the place where we want to display the player.

Vložení HTML kódu ve Wysiwyg editoru
Insert HTML code in Wysiwyg editor

Embed Youtube videos in Gutenberg editor in newer WordPress

If you use WordPress, where you have a modern version of the Gutenberg editor, which works on the principle of composing the content of the page from individual blocks, inserting a Youtube player is a breeze.

All we have to do is copy the Youtube video link, paste it directly into the content and the smart editor will automatically generate a video player. Alternatively, we can manually insert a new Youtube block and insert a link to the video here.

Blok s Youtube přehrávačem v Gutenberg editoru ve WordPress
Block with Youtube player in Gutenberg editor in WordPress

Automatic translation

This is an automatic translation of the original article in Czech.

Share

Leave a Reply

Your email address will not be published. Required fields are marked *