{"id":8918,"date":"2022-07-13T06:40:26","date_gmt":"2022-07-13T06:40:26","guid":{"rendered":"https:\/\/zeru.com\/blog\/?p=8918"},"modified":"2022-07-13T06:40:26","modified_gmt":"2022-07-13T06:40:26","slug":"how-to-embed-youtube-videos-on-your-website","status":"publish","type":"post","link":"https:\/\/zeru.com\/blog\/how-to-embed-youtube-videos-on-your-website","title":{"rendered":"How to Embed YouTube Videos on Your Website"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_43 counter-flat ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<p class=\"ez-toc-title\">Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69fbd34d0dd68\" class=\"cssicon\"><span style=\"display: flex;align-items: center;width: 35px;height: 30px;justify-content: center;direction:ltr;\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/label><label for=\"ez-toc-cssicon-toggle-item-69fbd34d0dd68\"  class=\"cssiconcheckbox\">1<\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69fbd34d0dd68\" ><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/zeru.com\/blog\/how-to-embed-youtube-videos-on-your-website\/#How_to_Embed_YouTube_Videos_on_Your_Website\" title=\"How to Embed YouTube Videos on Your Website\">How to Embed YouTube Videos on Your Website<\/a><\/li><li class='ez-toc-page-1'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/zeru.com\/blog\/how-to-embed-youtube-videos-on-your-website\/#Plugins\" title=\"Plugins\">Plugins<\/a><\/li><li class='ez-toc-page-1'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/zeru.com\/blog\/how-to-embed-youtube-videos-on-your-website\/#Custom_HTML_blocks\" title=\"Custom HTML blocks\">Custom HTML blocks<\/a><\/li><li class='ez-toc-page-1'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/zeru.com\/blog\/how-to-embed-youtube-videos-on-your-website\/#IFrame_embeds\" title=\"IFrame embeds\">IFrame embeds<\/a><\/li><li class='ez-toc-page-1'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/zeru.com\/blog\/how-to-embed-youtube-videos-on-your-website\/#Changing_the_player_size\" title=\"Changing the player size\">Changing the player size<\/a><\/li><li class='ez-toc-page-1'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/zeru.com\/blog\/how-to-embed-youtube-videos-on-your-website\/#Adding_a_timestamp\" title=\"Adding a timestamp\">Adding a timestamp<\/a><\/li><\/ul><\/nav><\/div>\n<h1><span class=\"ez-toc-section\" id=\"How_to_Embed_YouTube_Videos_on_Your_Website\"><\/span>How to Embed YouTube Videos on Your Website<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<p><img decoding=\"async\" alt=\"how to embed youtube video\" src=\"https:\/\/i.imgur.com\/09PPQbr.png\">  <\/p>\n<p>There are two ways to embed YouTube videos. First, you can use the YouTube Embed code to customize the presentation of your video. This option will give you control over the video player&#8217;s controls, including volume, captions, and more. You can also customize the player&#8217;s appearance with a custom iframe code. You can also choose to include privacy-enhanced mode and set the start time of your video.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Plugins\"><\/span>Plugins<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>There are several different types of WordPress plugins for embedding YouTube videos on a website. These tools provide a wide variety of options for customizing your videos. If you want to include videos from your YouTube channel, for example, you can embed the videos in a playlist and add a shortcode to control the number of playbacks for each video. Other plugins help you add video thumbnails and captions, and others provide a way to customize the appearance of your embeds.<\/p>\n<p>One of the most popular WordPress plugins for embedding YouTube videos is YotuWP. It supports uploading videos from YouTube and Vimeo as well as embedding Wistia videos. The Pro version has advanced features such as customizing video titles, backgrounds, and subtitles. It also offers a video gallery and overrides video metadata. It also costs $21 for lifetime updates and an unlimited-site license.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Custom_HTML_blocks\"><\/span>Custom HTML blocks<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>To embed a YouTube video on your site, follow these steps: Click the &#8220;+&#8221; icon on the Block editor and then select &#8220;Add Custom HTML block&#8221;. In the &#8220;Custom HTML block&#8221; pop-up window, enter the video URL in the iframe box. Select the &#8220;Add&#8221; button and then paste the embed code. When you&#8217;re done, click &#8220;Preview&#8221; and place your cursor. The video will now appear in the preview area of your website.<\/p>\n<p>In your page editor, locate the &#8220;+&#8221; icon and select &#8220;Custom HTML&#8221; block. Next, add the embed code in your post. Make sure that the URL is not hyperlinked. The YouTube video will now be embedded in your post. You can edit it as necessary, including the alignment and position. After adding the code, preview the post to ensure everything is right. If the embed code is not aligned properly, try removing the line break or making it wider.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"IFrame_embeds\"><\/span>IFrame embeds<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>You can add a YouTube video to your web site using an IFrame element or an object HTML tag. First, you need to create the html code. To do this, visit YouTube and copy the iframe code. Once you have the html code, paste it into your web page. You can use the object or iframe HTML tag, depending on what you prefer. It is important that the embed code be outside the pre-existing line of code.<\/p>\n<p>The IFrame API supports the new getIframe() method, which returns an iframe&#8217;s DOM node. The Requirements section of the iframe API has been updated to note the minimum player size. The content of this article and its code samples are licensed under the Creative Commons Attribution 4.0 License. For more information, see Google Developers&#8217; Site Policies. You can find examples of IFrame code in the Code Samples.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Changing_the_player_size\"><\/span>Changing the player size<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Changing the player size of a YouTube video on your website is easy. All you need to do is edit the code. To do this, you can right-click on the embed script and select Copy. Or, you can press Ctrl+C and open the OpenCms page editor. You&#8217;ll see a box with HTML source code. You can then modify the size of the video to fit the size of your website.<\/p>\n<p>You can change the size of the player in order to fit the video on your website. YouTube provides a resizing tool that allows you to change the size of the video to fit in the space. Once you&#8217;ve done this, you&#8217;re ready to embed the video. Choose the size and click on &#8220;Share&#8221; to embed it into your website. Click &#8220;Screen Size&#8221; to customize the player size.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Adding_a_timestamp\"><\/span>Adding a timestamp<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Adding a timestamp to a YouTube video is simple. First, open the YouTube video and pause it at a key moment. Then, click the share button. You will see the URL and a box called &#8220;Start at&#8221; &#8211; click that box to add a timestamp. You can paste this URL into your HTML code. Then, paste it into your page or post.<\/p>\n<p>When you embed a YouTube video, make sure that you use the correct format for the timestamp. Time stamps must be in Hours, Minutes, and Seconds. This method should be applicable to any video. Changing the timestamp in your video can cause broken links and the video to not play. Follow the directions on YouTube&#8217;s help page to create a timestamp for your embeddable video.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to Embed YouTube Videos on Your Website There are two ways to embed YouTube videos. First, you can use the YouTube Embed code to customize the presentation of your video. This option will give you control over the video player&#8217;s controls, including volume, captions, and more. You can also customize the player&#8217;s appearance with [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":9142,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v19.7 (Yoast SEO v21.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Embed YouTube Videos on Your Website - Zeru<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/zeru.com\/blog\/how-to-embed-youtube-videos-on-your-website\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Embed YouTube Videos on Your Website\" \/>\n<meta property=\"og:description\" content=\"How to Embed YouTube Videos on Your Website There are two ways to embed YouTube videos. First, you can use the YouTube Embed code to customize the presentation of your video. This option will give you control over the video player&#8217;s controls, including volume, captions, and more. You can also customize the player&#8217;s appearance with [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/zeru.com\/blog\/how-to-embed-youtube-videos-on-your-website\" \/>\n<meta property=\"og:site_name\" content=\"Zeru\" \/>\n<meta property=\"article:published_time\" content=\"2022-07-13T06:40:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/zeru.com\/blog\/wp-content\/uploads\/How-to-Embed-YouTube-Videos-on-Your-Website_8918.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"920\" \/>\n\t<meta property=\"og:image:height\" content=\"480\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Lizzie Yates\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Lizzie Yates\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/zeru.com\/blog\/how-to-embed-youtube-videos-on-your-website\",\"url\":\"https:\/\/zeru.com\/blog\/how-to-embed-youtube-videos-on-your-website\",\"name\":\"How to Embed YouTube Videos on Your Website - Zeru\",\"isPartOf\":{\"@id\":\"https:\/\/zeru.com\/blog\/#website\"},\"datePublished\":\"2022-07-13T06:40:26+00:00\",\"dateModified\":\"2022-07-13T06:40:26+00:00\",\"author\":{\"@id\":\"https:\/\/zeru.com\/blog\/#\/schema\/person\/61005d9ec00b94bc50fbaf11b78aa55e\"},\"breadcrumb\":{\"@id\":\"https:\/\/zeru.com\/blog\/how-to-embed-youtube-videos-on-your-website#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/zeru.com\/blog\/how-to-embed-youtube-videos-on-your-website\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/zeru.com\/blog\/how-to-embed-youtube-videos-on-your-website#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/zeru.com\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Embed YouTube Videos on Your Website\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/zeru.com\/blog\/#website\",\"url\":\"https:\/\/zeru.com\/blog\/\",\"name\":\"Zeru\",\"description\":\"Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/zeru.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/zeru.com\/blog\/#\/schema\/person\/61005d9ec00b94bc50fbaf11b78aa55e\",\"name\":\"Lizzie Yates\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/zeru.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/zeru.com\/blog\/wp-content\/uploads\/19-150x150.jpg\",\"contentUrl\":\"https:\/\/zeru.com\/blog\/wp-content\/uploads\/19-150x150.jpg\",\"caption\":\"Lizzie Yates\"},\"description\":\"A content marketing strategist with the Zeru team for a little over 5 years, Lizzie Yates specializes in everything digital media with a particular focus on social media and technology. Her passion? To follow how the social media sites like Instagram, YouTube, Facebook, Twitter, and TikTok are maturing over time, and what businesses can do to keep up. She shares her insights on our blog in a true outpouring of knowledge and expertise. Her knowledge about technology and social media is vast, and she is always willing to share her insights with businesses to help them stay up-to-date with the latest trends.\",\"url\":\"https:\/\/zeru.com\/blog\/author\/writer\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Embed YouTube Videos on Your Website - Zeru","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/zeru.com\/blog\/how-to-embed-youtube-videos-on-your-website","og_locale":"en_US","og_type":"article","og_title":"How to Embed YouTube Videos on Your Website","og_description":"How to Embed YouTube Videos on Your Website There are two ways to embed YouTube videos. First, you can use the YouTube Embed code to customize the presentation of your video. This option will give you control over the video player&#8217;s controls, including volume, captions, and more. You can also customize the player&#8217;s appearance with [&hellip;]","og_url":"https:\/\/zeru.com\/blog\/how-to-embed-youtube-videos-on-your-website","og_site_name":"Zeru","article_published_time":"2022-07-13T06:40:26+00:00","og_image":[{"width":920,"height":480,"url":"https:\/\/zeru.com\/blog\/wp-content\/uploads\/How-to-Embed-YouTube-Videos-on-Your-Website_8918.jpg","type":"image\/jpeg"}],"author":"Lizzie Yates","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Lizzie Yates","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/zeru.com\/blog\/how-to-embed-youtube-videos-on-your-website","url":"https:\/\/zeru.com\/blog\/how-to-embed-youtube-videos-on-your-website","name":"How to Embed YouTube Videos on Your Website - Zeru","isPartOf":{"@id":"https:\/\/zeru.com\/blog\/#website"},"datePublished":"2022-07-13T06:40:26+00:00","dateModified":"2022-07-13T06:40:26+00:00","author":{"@id":"https:\/\/zeru.com\/blog\/#\/schema\/person\/61005d9ec00b94bc50fbaf11b78aa55e"},"breadcrumb":{"@id":"https:\/\/zeru.com\/blog\/how-to-embed-youtube-videos-on-your-website#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/zeru.com\/blog\/how-to-embed-youtube-videos-on-your-website"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/zeru.com\/blog\/how-to-embed-youtube-videos-on-your-website#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/zeru.com\/blog"},{"@type":"ListItem","position":2,"name":"How to Embed YouTube Videos on Your Website"}]},{"@type":"WebSite","@id":"https:\/\/zeru.com\/blog\/#website","url":"https:\/\/zeru.com\/blog\/","name":"Zeru","description":"Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/zeru.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/zeru.com\/blog\/#\/schema\/person\/61005d9ec00b94bc50fbaf11b78aa55e","name":"Lizzie Yates","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zeru.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/zeru.com\/blog\/wp-content\/uploads\/19-150x150.jpg","contentUrl":"https:\/\/zeru.com\/blog\/wp-content\/uploads\/19-150x150.jpg","caption":"Lizzie Yates"},"description":"A content marketing strategist with the Zeru team for a little over 5 years, Lizzie Yates specializes in everything digital media with a particular focus on social media and technology. Her passion? To follow how the social media sites like Instagram, YouTube, Facebook, Twitter, and TikTok are maturing over time, and what businesses can do to keep up. She shares her insights on our blog in a true outpouring of knowledge and expertise. Her knowledge about technology and social media is vast, and she is always willing to share her insights with businesses to help them stay up-to-date with the latest trends.","url":"https:\/\/zeru.com\/blog\/author\/writer"}]}},"_links":{"self":[{"href":"https:\/\/zeru.com\/blog\/wp-json\/wp\/v2\/posts\/8918"}],"collection":[{"href":"https:\/\/zeru.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zeru.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zeru.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/zeru.com\/blog\/wp-json\/wp\/v2\/comments?post=8918"}],"version-history":[{"count":1,"href":"https:\/\/zeru.com\/blog\/wp-json\/wp\/v2\/posts\/8918\/revisions"}],"predecessor-version":[{"id":8919,"href":"https:\/\/zeru.com\/blog\/wp-json\/wp\/v2\/posts\/8918\/revisions\/8919"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/zeru.com\/blog\/wp-json\/wp\/v2\/media\/9142"}],"wp:attachment":[{"href":"https:\/\/zeru.com\/blog\/wp-json\/wp\/v2\/media?parent=8918"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zeru.com\/blog\/wp-json\/wp\/v2\/categories?post=8918"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zeru.com\/blog\/wp-json\/wp\/v2\/tags?post=8918"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}