Embed hosted video in Material for MkDocs
Updated: November 30, 2026
You want to add a video to a Material for MkDocs guide. Paste the responsive iframe into the Markdown as HTML on its own line. Use the full player URL and check the result where you actually publish the docs.
Prepare the clip and its context
Imagine a search feature guide with a 40-second demo. Upload a clip cleared for sharing to Dembed and open Embed once it is ready. Copy the responsive iframe. Its src should be the full HTTPS player address. Save the /v/ watch link as well so you can put it next to the instructions.
Place the HTML outside a code block
In the guide’s Markdown file, leave a blank line above and below the embed code. Paste it without the backticks used for code samples. Keep the explanation below in Markdown. Use the local preview to see whether the frame fits the page width.
If the page uses tabs or collapsible sections, test the clip after opening the section the way a reader will. Check that the watch link is next to the written instruction even in a narrow browser window. Check your deployment preview under the final subdirectory when possible. The guide’s address can change between preview and production, while the iframe should still point to the same Dembed player.
Check the built site at its final path
If you publish under /docs/, open the page there. Play the clip and check that the controls fit a narrow window. MkDocs does not validate or rewrite URLs inside raw HTML, so check the iframe address again when you replace the clip. Include a link to the watch page.
Frequently asked questions
Check whether the iframe is inside a code block. The published page should display the player and keep the watch link available.