<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>General Web Archives - Sourced Code</title>
	<atom:link href="https://sourcedcode.com/blog/category/general-web/feed" rel="self" type="application/rss+xml" />
	<link>https://sourcedcode.com</link>
	<description>AEM Blog Made Just for You.</description>
	<lastBuildDate>Thu, 04 Jul 2024 06:49:12 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.4.8</generator>

<image>
	<url>https://sourcedcode.com/wp-content/uploads/2019/09/cropped-favicon-32x32.png</url>
	<title>General Web Archives - Sourced Code</title>
	<link>https://sourcedcode.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Embed Youtube Iframe on Website with Video Loop</title>
		<link>https://sourcedcode.com/blog/general-web/embed-youtube-iframe-on-website-with-video-loop</link>
					<comments>https://sourcedcode.com/blog/general-web/embed-youtube-iframe-on-website-with-video-loop#respond</comments>
		
		<dc:creator><![CDATA[briankasingli]]></dc:creator>
		<pubDate>Thu, 04 Jul 2024 06:23:55 +0000</pubDate>
				<category><![CDATA[General Web]]></category>
		<guid isPermaLink="false">https://sourcedcode.com/?p=7133</guid>

					<description><![CDATA[<p>Embedding YouTube videos on your website is a common practice, but sometimes you may want the video to loop continuously. Fortunately, YouTube provides an easy way to set up looping for embedded videos. Basic Embed Code Start with the basic YouTube embed code (without loop). For example: 12345&#60;iframe src=&#34;https://www.youtube.com/embed/1O0yazhqaxs&#34; &#160; &#160; &#160; &#160;width=&#34;560&#34; &#160; &#160; [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://sourcedcode.com/blog/general-web/embed-youtube-iframe-on-website-with-video-loop">Embed Youtube Iframe on Website with Video Loop</a> appeared first on <a rel="nofollow" href="https://sourcedcode.com">Sourced Code</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Embedding YouTube videos on your website is a common practice, but sometimes you may want the video to loop continuously. Fortunately, YouTube provides an easy way to set up looping for embedded videos.</p>
<hr class="spacer-large" />
<h3 id="basic-embed-code">Basic Embed Code</h3>
<p>Start with the basic YouTube embed code (without loop). For example:</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;">&lt;<span style="color: #000000; font-weight: bold;">iframe</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;https://www.youtube.com/embed/1O0yazhqaxs&quot;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;560&quot;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;315&quot;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;3 Second Video&quot;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">frameborder</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">iframe</span>&gt;</div></td></tr></tbody></table></div>
<hr class="spacer-large" />
<h3 id="add-loop-parameter">Step 1: add Required &#8220;loop&#8221; Parameter</h3>
<p>To enable looping, you need to add <span class="code-highlight-primary">loop=1</span> to the URL parameters.</p>
<hr class="spacer-large" />
<h3 id="add-playlist-parameter">Step 2: add Required &#8220;playlist&#8221; Parameter</h3>
<p>You also need to include the <span class="code-highlight-primary">playlist</span> parameter with the video ID to ensure the video loops. The <span class="code-highlight-primary">playlist</span> parameter should have the same video ID as the video you want to loop.</p>
<hr class="spacer-large" />
<h3 id="complete-embed-code">Complete Embed Code</h3>
<p>Combine these parameters to create the final embed code. Here’s the complete code to loop the YouTube video:</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;">&lt;<span style="color: #000000; font-weight: bold;">iframe</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;https://www.youtube.com/embed/1O0yazhqaxs?loop=1&amp;fs=0&amp;playlist=1O0yazhqaxs&quot;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;560&quot;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;315&quot;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;3 Second Video&quot;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">frameborder</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">iframe</span>&gt;</div></td></tr></tbody></table></div>
<p>Example: <a href="https://jsfiddle.net/x4z73rjL/" rel="noopener" target="_blank">https://jsfiddle.net/x4z73rjL/</a></p>
<hr class="spacer-large" />
<h2 id="example-breakdown">Example Breakdown</h2>
<ul>
<li><strong>Video ID</strong>: <span class="code-highlight-primary">1O0yazhqaxs</span></li>
<li><strong>Loop Parameter</strong>: <span class="code-highlight-primary">loop=1</span> (enables looping)</li>
<li><strong>Playlist Parameter</strong>: <span class="code-highlight-primary">playlist=1O0yazhqaxs</span> (repeats the same video)</li>
</ul>
<hr class="spacer-large" />
<h2 id="final-embedded-video">Final Embedded Video</h2>
<p>Here is the full example of an embedded YouTube video that loops continuously:</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;">&lt;<span style="color: #000000; font-weight: bold;">iframe</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;https://www.youtube.com/embed/1O0yazhqaxs?loop=1&amp;fs=0&amp;playlist=1O0yazhqaxs&quot;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;560&quot;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;315&quot;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;3 Second Video&quot;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">frameborder</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">iframe</span>&gt;</div></td></tr></tbody></table></div>
<p>Example: <a href="https://jsfiddle.net/x4z73rjL/" rel="noopener" target="_blank">https://jsfiddle.net/x4z73rjL/</a></p>
<p>This will embed the YouTube video on your webpage, and it will loop automatically once it reaches the end.</p>
<hr class="spacer-large" />
<h2 id="additional-tips">Additional Tips</h2>
<ul>
<li><strong>Autoplay</strong>: If you want the video to start playing automatically when the page loads, you can add the <span class="code-highlight-primary">autoplay=1</span> parameter to the URL.
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;"><div>1<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;">&nbsp; &lt;<span style="color: #000000; font-weight: bold;">iframe</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;https://www.youtube.com/embed/1O0yazhqaxs?loop=1&amp;fs=0&amp;playlist=1O0yazhqaxs&amp;autoplay=1&quot;</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;560&quot;</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;315&quot;</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;3 Second Video&quot;</span> <span style="color: #000066;">frameborder</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">iframe</span>&gt;</div></td></tr></tbody></table></div>
</li>
<li><strong>Remove Controls</strong>: To hide the player controls, add <span class="code-highlight-primary">controls=0</span> to the URL parameters.
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;"><div>1<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;">&nbsp; &lt;<span style="color: #000000; font-weight: bold;">iframe</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;https://www.youtube.com/embed/1O0yazhqaxs?loop=1&amp;fs=0&amp;playlist=1O0yazhqaxs&amp;controls=0&quot;</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;560&quot;</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;315&quot;</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;3 Second Video&quot;</span> <span style="color: #000066;">frameborder</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">iframe</span>&gt;</div></td></tr></tbody></table></div>
</li>
</ul>
<p>By following these steps, you can easily loop embedded YouTube videos on your website, providing a seamless viewing experience for your audience.</p>
<p>The post <a rel="nofollow" href="https://sourcedcode.com/blog/general-web/embed-youtube-iframe-on-website-with-video-loop">Embed Youtube Iframe on Website with Video Loop</a> appeared first on <a rel="nofollow" href="https://sourcedcode.com">Sourced Code</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://sourcedcode.com/blog/general-web/embed-youtube-iframe-on-website-with-video-loop/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Embed Youtube Iframe on Website with Auto Play</title>
		<link>https://sourcedcode.com/blog/general-web/embed-youtube-iframe-on-website-with-auto-play</link>
					<comments>https://sourcedcode.com/blog/general-web/embed-youtube-iframe-on-website-with-auto-play#respond</comments>
		
		<dc:creator><![CDATA[briankasingli]]></dc:creator>
		<pubDate>Tue, 02 Jul 2024 12:35:43 +0000</pubDate>
				<category><![CDATA[General Web]]></category>
		<guid isPermaLink="false">https://sourcedcode.com/?p=7141</guid>

					<description><![CDATA[<p>Embedding YouTube videos on your website can significantly enhance user engagement. One useful feature is the ability to set videos to autoplay when the page loads. It is important to note that for autoplay to work, the video must be muted. This is due to modern browser restrictions aimed at improving user experience by preventing [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://sourcedcode.com/blog/general-web/embed-youtube-iframe-on-website-with-auto-play">Embed Youtube Iframe on Website with Auto Play</a> appeared first on <a rel="nofollow" href="https://sourcedcode.com">Sourced Code</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Embedding YouTube videos on your website can significantly enhance user engagement. One useful feature is the ability to set videos to autoplay when the page loads. It is important to note that for autoplay to work, the video must be muted. This is due to modern browser restrictions aimed at improving user experience by preventing unexpected audio playback.</p>
<hr class="spacer-larger" />
<h2 id="step-by-step-guide">Step-by-Step Guide</h2>
<ol>
<li>
    <strong>Basic Embed Code</strong>: Start with the basic YouTube embed code. For example:</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;">&nbsp; &nbsp; &lt;<span style="color: #000000; font-weight: bold;">iframe</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;https://www.youtube.com/embed/1O0yazhqaxs&quot;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;560&quot;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;315&quot;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;3 Second Video&quot;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">frameborder</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">iframe</span>&gt;</div></td></tr></tbody></table></div>
<p><a href="https://jsfiddle.net/x4z73rjL/1/" rel="noopener" target="_blank">https://jsfiddle.net/x4z73rjL/1/</a>
  </li>
<li>
    <strong>Add Autoplay and Mute Parameters</strong>: To enable autoplay, you must also mute the video. Modern browsers restrict autoplay unless the video is muted. Add the <span class="code-highlight-primary">autoplay=1</span> and <span class="code-highlight-primary">mute=1</span> parameters to the URL.
  </li>
<li>
    <strong>Complete Embed Code</strong>: Combine these parameters to create the final embed code. Here’s the complete code to autoplay and mute the YouTube video:</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;">&nbsp; &nbsp; &lt;<span style="color: #000000; font-weight: bold;">iframe</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;https://www.youtube.com/embed/1O0yazhqaxs?autoplay=1&amp;mute=1&quot;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;560&quot;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;315&quot;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;3 Second Video&quot;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">frameborder</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">iframe</span>&gt;</div></td></tr></tbody></table></div>
<p><a href="https://jsfiddle.net/x4z73rjL/2/" rel="noopener" target="_blank">https://jsfiddle.net/x4z73rjL/2/</a>
  </li>
</ol>
<hr class="spacer-larger" />
<h2 id="example-breakdown">Example Breakdown</h2>
<ul>
<li><strong>Video ID</strong>: <span class="code-highlight-primary">1O0yazhqaxs</span></li>
<li><strong>Autoplay Parameter</strong>: <span class="code-highlight-primary">autoplay=1</span> (enables autoplay)</li>
<li><strong>Mute Parameter</strong>: <span class="code-highlight-primary">mute=1</span> (mutes the video)</li>
</ul>
<hr class="spacer-larger" />
<h2 id="final-embedded-video">Final Embedded Video</h2>
<p>Here is the full example of an embedded YouTube video that autoplays and is muted:</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;">&lt;<span style="color: #000000; font-weight: bold;">iframe</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;https://www.youtube.com/embed/1O0yazhqaxs?autoplay=1&amp;mute=1&quot;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;560&quot;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;315&quot;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;3 Second Video&quot;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">frameborder</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">iframe</span>&gt;</div></td></tr></tbody></table></div>
<p><a href="https://jsfiddle.net/fo3yg4w9/" rel="noopener" target="_blank">https://jsfiddle.net/fo3yg4w9/</a></p>
<p>This will embed the YouTube video on your webpage, and it will start playing automatically and be muted.</p>
<hr class="spacer-larger" />
<h2 id="additional-tips">Additional Tips</h2>
<ul>
<li>
    <strong>Show Controls</strong>: If you want to keep the player controls visible, you can add <span class="code-highlight-primary">controls=1</span> (this is the default setting, so it’s optional).</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;"><div>1<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;">&nbsp; &nbsp; &lt;<span style="color: #000000; font-weight: bold;">iframe</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;https://www.youtube.com/embed/1O0yazhqaxs?autoplay=1&amp;mute=1&amp;controls=1&quot;</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;560&quot;</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;315&quot;</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;3 Second Video&quot;</span> <span style="color: #000066;">frameborder</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">iframe</span>&gt;</div></td></tr></tbody></table></div>
</li>
<li>
    <strong>Loop the Video</strong>: To make the video loop, add <span class="code-highlight-primary">loop=1</span> and <span class="code-highlight-primary">playlist</span> with the video ID.</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;">&nbsp; &nbsp; &lt;<span style="color: #000000; font-weight: bold;">iframe</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;https://www.youtube.com/embed/1O0yazhqaxs?autoplay=1&amp;mute=1&amp;loop=1&amp;playlist=1O0yazhqaxs&quot;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;560&quot;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;315&quot;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;3 Second Video&quot;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">frameborder</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">iframe</span>&gt;</div></td></tr></tbody></table></div>
<p><a href="https://jsfiddle.net/8h7vL5md/" rel="noopener" target="_blank">https://jsfiddle.net/8h7vL5md/</a>
  </li>
</ul>
<p>By following these steps, you can easily embed YouTube videos on your website with autoplay and mute enabled, enhancing the viewing experience for your audience.</p>
<p>For more details, you can refer to <a href="https://developer.chrome.com/blog/autoplay/" target="_blank" rel="noopener">Google&#8217;s Autoplay Policy</a> and <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/autoplay" target="_blank" rel="noopener">MDN Web Docs on Autoplay</a>.</p>
<p>The post <a rel="nofollow" href="https://sourcedcode.com/blog/general-web/embed-youtube-iframe-on-website-with-auto-play">Embed Youtube Iframe on Website with Auto Play</a> appeared first on <a rel="nofollow" href="https://sourcedcode.com">Sourced Code</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://sourcedcode.com/blog/general-web/embed-youtube-iframe-on-website-with-auto-play/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>HTML element style tag validation approaches in 2023</title>
		<link>https://sourcedcode.com/blog/css/html-element-style-tag-validation-approaches-in-2023</link>
					<comments>https://sourcedcode.com/blog/css/html-element-style-tag-validation-approaches-in-2023#respond</comments>
		
		<dc:creator><![CDATA[briankasingli]]></dc:creator>
		<pubDate>Sun, 30 Jul 2023 18:58:35 +0000</pubDate>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[General Web]]></category>
		<guid isPermaLink="false">https://sourcedcode.com/?p=5484</guid>

					<description><![CDATA[<p>In the rapidly changing world of web development, it&#8217;s essential to keep up with the latest standards. Some ways of inserting &#60;style&#62; tag to the HTML document are not valid for HTML5. In this article we will go through different compliant methods to insert &#60;style&#62; tags to your HTML documents. Although there are some invalid [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://sourcedcode.com/blog/css/html-element-style-tag-validation-approaches-in-2023">HTML element style tag validation approaches in 2023</a> appeared first on <a rel="nofollow" href="https://sourcedcode.com">Sourced Code</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In the rapidly changing world of web development, it&#8217;s essential to keep up with the latest standards. Some ways of inserting &lt;style&gt; tag to the HTML document are not valid for HTML5. In this article we will go through different compliant methods to insert &lt;style&gt; tags to your HTML documents. Although there are some invalid ways of inserting the &lt;style&gt; tag, we will explore some alternatives that adhere to the current HTML5 standards.</p>
<div class="mention-block">
<strong>Quick Links</strong></p>
<ol>
<li><a href="#external-stylesheets-valid">External Stylesheets (valid)</a></li>
<li><a href="#inline-style-tag-in-head">Inline &lt;style&gt; tag in the &lt;head&gt; (valid)</a></li>
<li><a href="#inline-style-tag-in-body">Inline &lt;style&gt; tag in the &lt;body&gt; (in-valid), but acceptable.</a></li>
</ol>
</div>
<hr class="spacer-larger"/>
<h2 id="external-stylesheets-valid">1. External Stylesheets (valid)</h2>
<p>One of the most common and recommended ways to style web pages is by using external stylesheets. Instead of adding styles directly into the HTML, you create a separate CSS file and link it to your web page. This keeps your HTML clean and separates the style rules from the content, making it easier to manage and reuse styles across multiple pages.</p>
<p>To link an external stylesheet, use the following code within the &lt;head&gt; section of your HTML document:</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;"><div>1<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;styles.css&quot;</span>&gt;</div></td></tr></tbody></table></div>
<hr class="spacer-larger"/>
<h2 id="inline-style-tag-in-head">2. Inline &lt;style&gt; tag in the &lt;head&gt; (valid)</h2>
<p>Another valid method is to use inline styles in the &lt;head&gt; section. If you have styles that are specific to a single page and won&#8217;t be reused elsewhere, you can write your CSS directly in the &lt;head&gt;. This ensures that your styles are loaded before the page content, preventing any unwanted visual glitches.</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;">&lt;!DOCTYPE html&gt;<br />
&lt;<span style="color: #000000; font-weight: bold;">html</span>&gt;<br />
&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;<br />
&nbsp; &lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;My Page&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;<br />
&nbsp; &lt;<span style="color: #000000; font-weight: bold;">style</span>&gt;<br />
&nbsp; &nbsp; <span style="color: #66cc66;">/</span>* Your CSS <span style="color: #000066;">rules</span> here *<span style="color: #66cc66;">/</span><br />
&nbsp; &lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">style</span>&gt;<br />
&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;<br />
&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;<br />
&nbsp; &lt;!-- Your page <span style="color: #000066;">content</span> here --&gt;<br />
&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;<br />
&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</div></td></tr></tbody></table></div>
<hr class="spacer-larger"/>
<h2 id="inline-style-tag-in-body">3. Inline &lt;style&gt; tag in the &lt;body&gt; (in-valid), but acceptable.</h2>
<p>A &lt;style&gt; tag within the &lt;body&gt; tag won’t validate because the HTML specs say it can’t be there. The reason behind this restriction is to maintain a clear separation of concerns between the content (HTML) and the presentation (CSS). Placing &lt;style&gt; tags within the &lt;body&gt; goes against the principles of well-structured and maintainable HTML documents. </p>
<p>Try running the code below in <a href="https://validator.w3.org/#validate_by_input" rel="noopener" target="_blank">https://validator.w3.org/#validate_by_input</a>, and you should able to see the error.</p>
<div class="mention-block">
<h5>Can I still use the &lt;style&gt; tag inside of the &lt;body&gt; tag?</h5>
<p>Using the &lt;style&gt; tag directly inside the &lt;body&gt; tag is not a valid approach according to the HTML5 specification. The official HTML5 specification strictly defines the placement of the &lt;style&gt; tag within the &lt;head&gt; element, specifically to separate content (HTML) from presentation (CSS).</p>
<p>However, placing &lt;style&gt; tags in the &lt;body&gt; will work in most modern browsers, but it is considered non-compliant. This approach however is still used by many websites out there. Especially with CMS platforms like WordPress, Drupal, Site-core, and Adobe Experience Managers, full-filling features and UX for simple scenarios, it is acceptable&#8230; The thing is, even thought we have HTML5 specification, even Google <a href="https://www.hobo-web.co.uk/official-google-prefers-valid-html-css/#:~:text=While%20Google%20recommends%20we%20use,it%20is%20to%20the%20query." rel="noopener" target="_blank">(source)</a> themselves are taking shortcuts to cut down performance costs.</p>
<p>Note: While Google recommends we use W3C validation, Google doesn&#8217;t rank valid html and css pages above invalid pages. If Google can crawl and render a page Google will rank the page appropriately based on how relevant it is to the query. <a href="https://www.hobo-web.co.uk/official-google-prefers-valid-html-css/#:~:text=While%20Google%20recommends%20we%20use,it%20is%20to%20the%20query." rel="noopener" target="_blank">source.</a>
</div>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;">&lt;!DOCTYPE html&gt;<br />
&lt;<span style="color: #000000; font-weight: bold;">html</span>&gt;<br />
&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;<br />
&nbsp; &lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;My Page&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;<br />
&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;<br />
&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;<br />
&nbsp; &lt;!-- Your page <span style="color: #000066;">content</span> here --&gt;<br />
&nbsp; &lt;<span style="color: #000000; font-weight: bold;">style</span>&gt;<br />
&nbsp; &nbsp; * Your CSS <span style="color: #000066;">rules</span> here *<span style="color: #66cc66;">/</span><br />
&nbsp; &lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">style</span>&gt;<br />
&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;<br />
&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</div></td></tr></tbody></table></div>
<hr class="spacer-larger"/>
<h2>Summary</h2>
<p>Following W3C standards in web development brings positive outcomes such as improved cross-browser compatibility, accessibility, future-proofing, and maintainability. It also fosters interoperability, boosts SEO performance, enhances security, and contributes to a positive reputation. Embracing W3C standards ensures a faster development process and a healthier web ecosystem.</p>
<p>The post <a rel="nofollow" href="https://sourcedcode.com/blog/css/html-element-style-tag-validation-approaches-in-2023">HTML element style tag validation approaches in 2023</a> appeared first on <a rel="nofollow" href="https://sourcedcode.com">Sourced Code</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://sourcedcode.com/blog/css/html-element-style-tag-validation-approaches-in-2023/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Use the Gmail SMTP Server to Send Emails for Free</title>
		<link>https://sourcedcode.com/blog/general-web/how-to-use-the-gmail-smtp-server-to-send-emails-for-free</link>
					<comments>https://sourcedcode.com/blog/general-web/how-to-use-the-gmail-smtp-server-to-send-emails-for-free#respond</comments>
		
		<dc:creator><![CDATA[briankasingli]]></dc:creator>
		<pubDate>Thu, 20 Jan 2022 07:20:41 +0000</pubDate>
				<category><![CDATA[General Web]]></category>
		<guid isPermaLink="false">https://sourcedcode.com/?p=3312</guid>

					<description><![CDATA[<p>This article will be instructions on how you can make your personal Google Gmail account into an SMTP server. For us developers, this is great, because we can use this feature to send out emails from our application(s) without being blocked by our system administrators or other internal team blockers. But keep in mind, this [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://sourcedcode.com/blog/general-web/how-to-use-the-gmail-smtp-server-to-send-emails-for-free">How to Use the Gmail SMTP Server to Send Emails for Free</a> appeared first on <a rel="nofollow" href="https://sourcedcode.com">Sourced Code</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>This article will be instructions on how you can make your personal Google Gmail account into an SMTP server. For us developers, this is great, because we can use this feature to send out emails from our application(s) without being blocked by our system administrators or other internal team blockers. But keep in mind, this will only allow us to send out 500 emails per day, but that should be enough right?</p>
<p>Before we get started, I would recommend that you&#8217;d use a Google account that is meant for your development efforts. Because once you configure your account to send out emails as an SMTP server, your account will be vulnerable, <a href="https://support.google.com/accounts/answer/6010255" rel="noopener" target="_blank">learn more (Google external link)</a>.</p>
<div class="mention-block">
<strong>Alert!</strong><br />
In order for us to be able to send out emails, your Google account must be configuration to Authorize access. If this step has already been done, skip to link #2.</p>
<ol>
<li><a href="#authorize-google-account">Authorize access to your Google account</a></li>
<li><a href="#smpt-configurations">Configuration for your Application Server</a></li>
</ol>
</div>
<hr class="spacer-large" />
<h2 id="authorize-google-account">1. Authorize access to your Google account</h2>
<p><strong>Step 1.</strong> Login to your <a href="https://myaccount.google.com/?pli=1" rel="noopener" target="_blank">Google Account</a>.<br />
Once you have logged into your account, click on the security link on the sidebar navigation. Click <a href="https://myaccount.google.com/security" rel="noopener" target="_blank">here for direct access</a>.<br />
<a class="foobox fbx-link fbx-instance" href="https://sourcedcode.com/wp-content/uploads/2022/01/step-1-how-to-use-the-gmail-smtp-server-to-send-emails-for-free.png"><img decoding="async" width="300" src="https://sourcedcode.com/wp-content/uploads/2022/01/step-1-how-to-use-the-gmail-smtp-server-to-send-emails-for-free.png" alt="step 1: this screenshot indicates to the participant to click on the security link button; click it." /></a></p>
<p><strong>Step 2.</strong> Scroll to around the bottom of the page and click on the &#8220;Turn off access (recommended)&#8221;, to navigate to the configuration page. Click <a href="https://myaccount.google.com/security" rel="noopener" target="_blank">here for direct access</a>.<br />
<a class="foobox fbx-link fbx-instance" href="https://sourcedcode.com/wp-content/uploads/2022/01/step-2-how-to-use-the-gmail-smtp-server-to-send-emails-for-free.png"><img decoding="async" width="300" src="https://sourcedcode.com/wp-content/uploads/2022/01/step-2-how-to-use-the-gmail-smtp-server-to-send-emails-for-free.png" alt="step 2: this screenshot indicates to the participant to scroll down near the bottom of the page to access the Turn off access (recommended) link; click it." /></a></p>
<p><strong>Step 3.</strong> In the Less secure app access page, toggle the Allow less secure apps option.<br />
<a class="foobox fbx-link fbx-instance" href="https://sourcedcode.com/wp-content/uploads/2022/01/step-3-how-to-use-the-gmail-smtp-server-to-send-emails-for-free.png"><img decoding="async" width="300" src="https://sourcedcode.com/wp-content/uploads/2022/01/step-3-how-to-use-the-gmail-smtp-server-to-send-emails-for-free.png" alt="step 3: this screenshot indicates to the participant to toggle and enable the Allow less secure apps option." /></a></p>
<div class="mention-block">
<strong>Reminder</strong><br />
Please remember that once this, Allow less secure apps option, has been enabled, it will make your account vulnerable. Make sure you use a disposable account for this.
</div>
<p>Once the Allow less secure apps option is enabled, you can start sending out emails using your Google account as the SMTP mail server. Skip to step 2 to <a href="#smpt-configurations">configuration for your application server</a>.</p>
<hr class="spacer-larger" />
<h2 id="smpt-configurations">2. Configuration for your Application Server</h2>
<p>Once you have authorized access to your Google account, you are set, use the configuration below, and you should be able to start sending free emails from your Google Gmail account!</p>
<div class="mention-block">
<strong>Google SMTP Configurations</strong><br />
SMTP server hostname: smtp.gmail.com<br />
SMTP server port: 465, 25 or 587 (test in that order)<br />
SMTP user: contact@sourcedcode.com<br />
SMTP password: p4ssw0rd (this password is the password of your email address)<br />
SMTP TLS/SSL: true
</div>
<p>The post <a rel="nofollow" href="https://sourcedcode.com/blog/general-web/how-to-use-the-gmail-smtp-server-to-send-emails-for-free">How to Use the Gmail SMTP Server to Send Emails for Free</a> appeared first on <a rel="nofollow" href="https://sourcedcode.com">Sourced Code</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://sourcedcode.com/blog/general-web/how-to-use-the-gmail-smtp-server-to-send-emails-for-free/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
