Animated illustration of a smiling man with glasses in a black T-shirt

What Does Embedding a Video Mean? How to Embed a Video

Embedding a video means showing a video that is stored on another site, such as YouTube, Vimeo or Wistia, inside your own web page. You copy a short piece of embed code (usually an iframe) from the video host and paste it into your page. Visitors watch the video without leaving your site, while the host stores the file and streams it to them.

It’s the simplest way to put video on a website: no large files on your server, no video player to build, and the video still plays smoothly on any device. Below we explain how embedding works, how it differs from linking and uploading, what embed code looks like, how to embed a video in WordPress or HTML, the settings worth knowing, and how to fix an embedded video that won’t play. If you’re planning a video for your homepage, see our guide to the website explainer video.

Thinking of getting your own video?

Schedule a call with our team.

Schedule a call

What does embedding a video mean?

In web terms, to embed something is to display content from another source inside your page. The HTML standard calls this embedded content, and it covers images, audio, video and inline frames (iframes). An embedded video is a small window in your page that loads the video host’s player.

When someone opens a page with an embedded video, this is what happens:

  1. The browser loads your page and finds the embed code.
  2. It requests the video player from the host at the address in the code.
  3. The player appears in your page, usually as a thumbnail with a play button.
  4. When the visitor presses play, the host streams the video, often adjusting the quality to suit their connection.
  5. The host counts the view in its own analytics, while your website analytics record the page visit.

The video file never sits on your server. That means the host’s rules travel with it: if the owner deletes the video, makes it private or turns off embedding, your page shows an error where the video used to be.

There are three ways to share a video from a website. Here’s how they compare:

EmbedLinkUpload (self-host)
Where the video playsInside your page, in the host’s playerOn the host’s site, in a new page or tabInside your page, in your own player
Where the file is storedWith the hostWith the hostOn your server or CDN
Visitors stay on your site?YesNoYes
Bandwidth and storage cost to youNoneNoneYou pay for both
EffortCopy and pasteCopy and pasteEncoding, a player and hosting set-up
Control over the playerLimited to the host’s settingsNoneFull
Best forMost websites, blogs and landing pagesSocial posts and emailsBackground videos, or when you need full control

For most businesses, embedding gives the best balance. If you’re choosing a host, our guides to Wistia video hosting and YouTube alternatives for hosting your videos compare the main options.

What embed code looks like

Embed code is a few lines of HTML. A typical YouTube embed looks like this:

<iframe width="560" height="315"
  src="https://www.youtube.com/embed/VIDEO_ID"
  title="Video title"
  allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
  allowfullscreen loading="lazy"></iframe>
  • src is the address of the player, including the video’s ID.
  • width and height set the size of the frame. Most sites make it responsive so it fills the column on any screen.
  • title describes the video for screen readers.
  • allow and allowfullscreen give the player permission to use features such as full screen and picture-in-picture.
  • loading=”lazy” tells the browser to wait until the visitor scrolls near the video before loading it.

And this is the result, one of our own films embedded with code like the above:

Why embed videos on your website?

  • Visitors stay on your page. A link sends people to YouTube, where the next recommended video is one click away. An embed keeps them reading, watching and moving towards your call to action.
  • Your server does less work. Video files are large. With an embed, the host stores and streams the file, so your hosting plan and page weight aren’t affected by the video itself.
  • It plays well everywhere. Video hosts handle formats, mobile playback and quality switching for you.
  • Context helps the message. A product video next to the product description, or a how-to inside a help article, is more useful than the same video on its own.
  • It’s easy to update. Replace the video on the host and every page that embeds it can show the new version, depending on the host.

The trade-off is control: the player looks and behaves the way the host allows. Business hosts such as Wistia offer more branding and fewer distractions than free platforms. For a deeper look at getting a video seen, read our guide to video optimization.

How to embed a YouTube video

  1. Open the video on YouTube on a computer.
  2. Click Share under the video, then Embed.
  3. Optional: tick Start at to choose the starting point, and turn on privacy-enhanced mode if offered.
  4. Click Copy to copy the HTML code.
  5. Paste the code into your page where you want the video to appear, then save and check the page.

Vimeo, Wistia and most other hosts work the same way: look for a Share or Embed button, copy the code and paste it into your page.

How to embed a video in WordPress

WordPress makes embedding especially easy. There are two methods:

Method 1: paste the URL (easiest)

  1. Copy the video’s normal page address, for example the YouTube or Vimeo URL from your browser.
  2. In the block editor, paste the URL on an empty line, or add a YouTube, Vimeo or Embed block and paste it there.
  3. WordPress turns the link into a player automatically. Preview the page, then update or publish.

This method is quick but offers few options. You can’t easily set a start time or change player settings.

Method 2: use a Custom HTML block (more control)

  1. Copy the embed code from the video host.
  2. Add a Custom HTML block where you want the video.
  3. Paste the code, adjust any settings in the address (see the table below), then preview and save.

Many themes and page builders also have their own video widgets. They do the same job; the key is to paste the host’s URL or embed code rather than uploading the file to your media library.

How to embed a video with HTML

On a hand-coded site, paste the iframe code into your HTML where the video should appear. To make the player resize with the screen, wrap it in a container that keeps a 16:9 shape:

<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;">
  <iframe src="https://www.youtube.com/embed/VIDEO_ID" title="Video title"
    style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;"
    allowfullscreen loading="lazy"></iframe>
</div>

If you host the file yourself, use the HTML video element instead, pointing it at your MP4 file. That is self-hosting rather than embedding, so you take on the storage and bandwidth.

Useful embed settings

YouTube lets you change how an embedded video behaves by adding settings to the end of the embed address (after a ?, with & between settings). Other hosts have similar options in their embed menus:

What you wantYouTube settingNotes
Start at a certain pointstart=30Time in seconds
Play automaticallyautoplay=1&mute=1Browsers usually block autoplay with sound, so mute it
Loop the videoloop=1&playlist=VIDEO_IDLooping a single video needs the playlist setting too
Hide the player controlscontrols=0Use sparingly; viewers expect controls
Show captions by defaultcc_load_policy=1Only works if the video has captions
More privacy for visitorsUse youtube-nocookie.com in the addressYouTube’s privacy-enhanced mode

For example, https://www.youtube.com/embed/VIDEO_ID?start=30&mute=1 starts 30 seconds in, with the sound off.

A short film like this 30-second ad is ideal for embedding on a landing page, where visitors may only stay a moment.

Embedded videos, page speed and SEO

  • Lazy-load players. Each embedded player loads extra files. Lazy loading (loading=”lazy”, or a performance plugin) waits until the visitor scrolls near the video.
  • Use a thumbnail “facade” on busy pages. Some sites show a static image with a play button and only load the real player on click. It keeps pages with several videos fast.
  • Give each video a clear title and surrounding text. Search engines understand a video better when the page explains what it is about.
  • Help search engines find your videos. A video sitemap and structured data make it easier for videos on your site to appear in search results.
  • Optimise the video on its host too. On YouTube, titles, descriptions and chapters matter; see our guide to YouTube SEO.

Why won’t my embedded video play?

What you seeLikely causeFix
“Video unavailable” or “Playback on other websites has been disabled”The owner has turned off embeddingIf it’s your video, turn on “Allow embedding” in the video’s settings on the host. If not, link to it instead
The video asks people to watch on YouTubeThe video is age-restrictedAge-restricted videos can’t be played on most other websites
A blank or grey boxThe video is private or deleted, or the code was pasted into a visual editor as textCheck the video’s visibility, and paste code into an HTML block
The video is tiny or overflows on mobileFixed width and heightUse a responsive wrapper or your editor’s video block
Autoplay doesn’t workThe browser blocks autoplay with soundAdd mute=1, or let visitors press play

Unlisted YouTube videos can be embedded; private ones can’t. That makes unlisted a handy setting for videos you want on your site but not in YouTube search.

Need a video worth embedding? Browse our portfolio of animated explainers, or read what an explainer video is.

Thinking of getting your own video?

Schedule a call with our team.

Schedule a call

FAQ

What does embedding a video mean?

Showing a video hosted elsewhere, such as on YouTube or Vimeo, inside your own web page. You paste a short piece of embed code into your page; the host stores and streams the video, and visitors watch without leaving your site.

What is the difference between embedding and uploading a video?

Uploading stores the file on your own server; embedding plays it from the host’s server. Embedding saves you storage and bandwidth and gives smooth playback, while uploading (self-hosting) gives you full control of the player.

Is embedding a video the same as linking to it?

No. A link sends visitors to the host’s website to watch. An embed plays the video inside your page, so they stay on your site.

What is embed code?

A few lines of HTML, usually an iframe, that loads the host’s video player in your page. You get it from the Share or Embed option on the video host and paste it into your page’s HTML.

Does an embedded video slow down my website?

A little, because the player loads extra files, but far less than self-hosting a large file. Lazy loading or a thumbnail facade keeps pages fast, especially if they have several videos.

What does “allow embedding” mean on YouTube?

It is a video setting that lets other websites play the video in their pages. If the owner turns it off, embedded copies show an error saying playback on other websites has been disabled.

Can I embed someone else’s YouTube video?

Yes, if the owner allows embedding. The video stays on the owner’s channel and counts towards their views. Embedding is not the same as downloading and re-uploading, which needs permission.

How do I embed a video in WordPress?

Paste the video’s URL into the block editor, or use a YouTube, Vimeo or Embed block. For more control, paste the host’s embed code into a Custom HTML block.

Can I make an embedded video start at a certain time?

Yes. On YouTube, tick “Start at” in the embed options, or add start= and the time in seconds to the embed address.

Can unlisted or private YouTube videos be embedded?

Unlisted videos can be embedded; private videos can’t. Unlisted is useful for videos you want on your website but not in YouTube search results.

Can Animation Explainers make a video for my website?

Yes. We make animated explainer videos for homepages, landing pages and product pages, delivered ready to upload to YouTube, Vimeo or Wistia and embed on your site.

Schedule a call with Animation Explainers
  1. What does embedding a video mean?

    Showing a video hosted elsewhere, such as on YouTube or Vimeo, inside your own web page. You paste a short piece of embed code into your page; the host stores and streams the video, and visitors watch without leaving your site.

  2. What is the difference between embedding and uploading a video?

    Uploading stores the file on your own server; embedding plays it from the host’s server. Embedding saves you storage and bandwidth and gives smooth playback, while uploading (self-hosting) gives you full control of the player.

  3. Is embedding a video the same as linking to it?

    No. A link sends visitors to the host’s website to watch. An embed plays the video inside your page, so they stay on your site.

  4. What is embed code?

    A few lines of HTML, usually an iframe, that loads the host’s video player in your page. You get it from the Share or Embed option on the video host and paste it into your page’s HTML.

  5. Does an embedded video slow down my website?

    A little, because the player loads extra files, but far less than self-hosting a large file. Lazy loading or a thumbnail facade keeps pages fast, especially if they have several videos.

  6. What does “allow embedding” mean on YouTube?

    It is a video setting that lets other websites play the video in their pages. If the owner turns it off, embedded copies show an error saying playback on other websites has been disabled.

  7. Can I embed someone else’s YouTube video?

    Yes, if the owner allows embedding. The video stays on the owner’s channel and counts towards their views. Embedding is not the same as downloading and re-uploading, which needs permission.

  8. How do I embed a video in WordPress?

    Paste the video’s URL into the block editor, or use a YouTube, Vimeo or Embed block. For more control, paste the host’s embed code into a Custom HTML block.

  9. Can I make an embedded video start at a certain time?

    Yes. On YouTube, tick “Start at” in the embed options, or add start= and the time in seconds to the embed address.

  10. Can unlisted or private YouTube videos be embedded?

    Unlisted videos can be embedded; private videos can’t. Unlisted is useful for videos you want on your website but not in YouTube search results.

  11. Can Animation Explainers make a video for my website?

    Yes. We make animated explainer videos for homepages, landing pages and product pages, delivered ready to upload to YouTube, Vimeo or Wistia and embed on your site.

Start typing and press Enter to search