The {{YouTube}} directive embeds a responsive, privacy-preserving video player.
Syntax
{{YouTube VIDEO_REF |#| Title=Descriptive title |#| StartSeconds=45 |#| Caption=Optional caption}}
Parameters
| Parameter | Required | Description |
|---|---|---|
| Video Reference | Yes | 11-character YouTube video ID or accepted YouTube URL. |
Title= |
Yes | Plain text title used for the video banner and accessibility label. |
StartSeconds= |
No | Playback start offset in seconds (e.g. 90). |
Caption= |
No | Optional caption rendered in a <figcaption> beneath the player. |
Accepted URL Formats
- Bare ID:
M7lc1UVf-VE - Short URL:
https://youtu.be/M7lc1UVf-VE - Standard Watch URL:
https://www.youtube.com/watch?v=M7lc1UVf-VE - Shorts URL:
https://www.youtube.com/shorts/M7lc1UVf-VE - Embed URL:
https://www.youtube-nocookie.com/embed/M7lc1UVf-VE
Privacy & Performance Design
- Zero Upfront Tracking: No external iframes, YouTube scripts, or tracking cookies are loaded when the page opens.
- Click-to-Load: The video poster and play button render entirely from local markup and CSS. The embedded iframe is generated only when the reader clicks play.
- No-Cookie Domain: When loaded, the player uses
www.youtube-nocookie.com. - Accessible Fallback: Without JavaScript, the component acts as a direct link to the canonical YouTube video.
Example
{{YouTube https://youtu.be/M7lc1UVf-VE |#| Title=Byte Magazine Retrospective |#| StartSeconds=30 |#| Caption=A documentary retrospective on early computing periodicals.}}
Return to the Formatting Guide.