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.}}
Linking to YouTube in text
To name a video, channel or handle in a sentence, use {{YouTubeLink}} instead of pasting a YouTube address or a raw channel ID. It renders an ordinary link with a small YouTube play mark.
The publisher posted the {{YouTubeLink Video=M7lc1UVf-VE |#| Label=launch trailer}} on its
{{YouTubeLink Channel=UCxNu4IGHko2yxmagLfqHtxw |#| Label=official channel}}, later {{YouTubeLink Handle=@example |#| Label=@example}}.
| Parameter | Required | Description |
|---|---|---|
Video= |
One of these three | 11-character video ID or any accepted YouTube video URL (a timestamp is kept). |
Channel= |
One of these three | Channel ID: UC followed by 22 characters. |
Handle= |
One of these three | Handle, with or without @. |
Label= |
Yes | The text readers see, usually the video's title or the channel's name. |
It works in paragraphs, tables, infobox values (such as Website=) and timeline descriptions. If a value is invalid the directive shows as text, and saving reports why. Cite a YouTube source with {{Citation ... |#| url=...}}.
Return to the Formatting Guide.