Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:YouTube: Difference between revisions

Template page
(Created page with "<div class="youtube-container" style="text-align: {{{align|center}}};"><youtube width="{{{width|800}}" height="{{{height|500}}}">{{{url|{{{video|{{{1|https://youtu.be/gPnJPMzRZL8}}}}}}}}}</youtube></div><templatestyles src="Template:YouTube/styles.css"/><noinclude><!-- For preview only --><templatestyles src="Template:YouTube/styles.css"/>{{/doc}}</noinclude>")
Tag: 2017 source edit
 
No edit summary
Tags: Manual revert 2017 source edit
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div class="youtube-container" style="text-align: {{{align|center}}};"><youtube width="{{{width|800}}" height="{{{height|500}}}">{{{url|{{{video|{{{1|https://youtu.be/gPnJPMzRZL8}}}}}}}}}</youtube></div><templatestyles src="Template:YouTube/styles.css"/><noinclude><!-- For preview only --><templatestyles src="Template:YouTube/styles.css"/>{{/doc}}</noinclude>
<div class="youtube-container" style="text-align: {{{align|center}}};"><youtube width="{{{width|800}}" height="{{{height|500}}">{{{url|{{{video|{{{1|https://youtu.be/dQw4w9WgXcQ}}}}}}}}}</youtube></div><templatestyles src="Template:YouTube/styles.css"/><noinclude><!-- For preview only --><templatestyles src="Template:YouTube/styles.css"/>{{/doc}}</noinclude>

Latest revision as of 18:58, 3 September 2024

Embeds a YouTube video into an article.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Video URLvideo

The YouTube video's URL to embed

Example
https://youtu.be/dQw4w9WgXcQ
URLrequired
Video alignmentalign

How the video should be aligned on the page. This value likely does nothing.

Suggested values
left right center
Default
center
Unknownoptional
Widthwidth

The initial width of the video. Do not include "px". This value is not necessarily required since the width is dynamic.

Default
800
Example
800
Numberoptional
Heightheight

The height of the video. Do not include "px".

Default
500
Example
500
Numbersuggested