Uploading a Video to your Website

Background Information

You start off with an HTML document.  The document contains many elements.  For example, there’s a paragraph element, a heading element, a link element, a list element etc.  Your internet browser interprets the elements in your HTML document, and spits out the webpage that you see on your computer.

Image

Inserting a Video: The Hard Way

The hard way of inserting a video into your website is by using the <video> tag.  Basically… it’s hard because you have to do various things to make sure that the video plays properly in all the browsers.  See http://www.w3schools.com/html/html_videos.asp if you want to learn how.  And see this as an example:

<video width=”320″ height=”240″ controls autoplay>
<source src=”movie.ogg” type=”video/ogg”>
<source src=”movie.mp4″ type=”video/mp4″>

</video>

Inserting a Video: The Easy Way

Programming well is all about getting stuff done, and there’s no reason to do something the hard way when you could just do it the easy way.  The easy way of inserting a video into your website is to 1) upload it to YouTube, and 2) use the iframe element.  Like so:

<iframe width=”420″ height=”345″
src=”http://www.youtube.com/embed/XGSy3_Czz8k”&gt;
</iframe

– Adam Zerner

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s