Video Embedding Example¶
This page demonstrates how to embed YouTube videos in your MkDocs documentation.
Method 1: Using HTML iframe (Responsive)¶
Method 2: Direct iframe (Fixed size)¶
How to Use¶
- Replace
VIDEO_IDwith your actual YouTube video ID - The video ID is the part after
v=in a YouTube URL - Example:
https://www.youtube.com/watch?v=dQw4w9WgXcQ→ video ID isdQw4w9WgXcQ
Best Practice¶
Use Method 1 (with video-container class) for responsive videos that adapt to different screen sizes, including mobile devices.