Insert a video
This tutorial shows you how to insert a YouTube or Vimeo video into a page or blog post on your website. It works for company videos, property walkthroughs, talks, buyer tips, or any content of your own that you want to show on your site.
The video file is not uploaded to Mapaprop. The video lives on YouTube (or Vimeo) and your site displays it. That brings three concrete advantages: it takes up no space on your site, it loads quickly on any connection, and there is no length limit — a one-hour talk is published just like a two-minute video.
What you will achieve
A page or blog article with the video playing inside your own site, without the visitor having to leave for YouTube, and with whatever text you want before and after it.
Step 1 — Upload the video to YouTube
- Go to youtube.com and sign in with your Google account (if you don't have one, you can create it for free).
- Click the camera with a + icon (top right) and choose Upload video.
- Select the file and fill in the title and description.
- On the Visibility step, choose one of these two options:
| Option | What it means |
|---|---|
| Public | It appears on your channel and in YouTube searches. Recommended: it adds reach on top of your site |
| Unlisted | It does not appear in searches or on your channel, but it does play inside your website |
Do not choose Private: only you can see a private video, so your website would show a box with an error. If you don't want the video to be found on YouTube, the right option is Unlisted.
Step 2 — Copy the embed code
- Open the uploaded video on YouTube.
- Below the player, click Share.
- Among the options that appear, choose Embed (the
< >icon). - Click Copy.
The code you copied looks like this:
<iframe width="560" height="315" src="https://www.youtube.com/embed/XXXXXXXXXXX" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
If you want the video to start at a specific minute, tick the "Start at" box and enter the time before copying. This is very useful with long videos: you can publish the same talk in several articles, each one starting at the topic it covers.
Step 3 — Turn on HTML Mode in your page or post
From the editor of a page or of a blog post:
- Go to the Edit tab.
- Place the cursor where you want the video to appear.
- On the toolbar, click the button with the code icon (
</>), located just before the undo and redo arrows. Hovering over it shows "View / edit HTML". - Confirm the warning that appears.
The editor switches to a dark background with monospaced text: that is HTML Mode.
Step 4 — Paste the video code
Paste the <iframe ...> code exactly where you want the video to appear. You can combine it with text before and after:
<h2>Talk: how to prepare your property before selling it</h2>
<p>We recorded this talk at our office. It runs for an hour and covers the most common mistakes when putting a property up for sale.</p>
<iframe width="560" height="315" src="https://www.youtube.com/embed/XXXXXXXXXXX" frameborder="0" allowfullscreen></iframe>
<p>If you have questions about any point, write to us and we'll go through it.</p>
Step 5 — Making it look right on mobile
The code YouTube gives you comes with fixed dimensions (width="560"), so on a phone the video gets cut off or throws the page out of shape. To make it adapt to any screen, wrap the <iframe> like this:
<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
<iframe src="https://www.youtube.com/embed/XXXXXXXXXXX" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" frameborder="0" allowfullscreen></iframe>
</div>
The only thing you need to replace is the video code (whatever comes after /embed/). The 56.25% keeps the usual widescreen proportion, the same one YouTube uses.
If the video is vertical (filmed with the phone upright), change 56.25% to 177%.
Step 6 — Save from HTML Mode
- Without leaving HTML Mode, click Save.
- Open your website in a new tab and check that the video appears and plays.
Save from HTML Mode. The visual editor cannot display an embedded video, so if after pasting the code you go back to the visual editor and type something there, the video is lost and has to be pasted again. Switching modes without typing does not delete it, but the safe way is to paste, save, and only then go back.
Property videos: no HTML needed
Everything above is for pages and blog articles. If what you want is to show a video on a property listing, you don't need to touch any code: there is a dedicated screen where you paste the YouTube video address and that's it. See Videos and 360 tours.
Vimeo and other platforms
The procedure is the same with any platform that offers an <iframe> code:
- Vimeo: on the video, Share > Embed, and copy the code.
- Facebook and Instagram: on the post, three-dot menu > Embed.
- Any other service whose sharing options offer "Embed".
Common troubleshooting
| Problem | Likely cause |
|---|---|
| The video does not appear | The <iframe> code was cut off when pasting. Go back to HTML Mode and check that it is complete, with its closing </iframe> |
| A black box appears saying the video is unavailable | The video was left as Private on YouTube. Change it to Public or Unlisted (Step 1) |
| The video is cut off on mobile | It is missing the adaptive dimensions from Step 5 |
| The video was there and disappeared | The page was edited in the visual editor after pasting the code (see the warning in Step 6) |
| The link shows instead of the video | The video address was pasted instead of the Embed code (Step 2) |