embedding videos. adding videos to our website: videos can make our pages more interesting and...

7
Embedding Videos

Upload: theodora-woods

Post on 24-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Embedding Videos. Adding Videos to Our Website: Videos can make our pages more interesting and engaging. Most video-hosting websites, such as YouTube,

Embedding Videos

Page 2: Embedding Videos. Adding Videos to Our Website: Videos can make our pages more interesting and engaging. Most video-hosting websites, such as YouTube,

Adding Videos to Our Website: Videos can make our pages more interesting

and engaging. Most video-hosting websites, such as

YouTube, will provide us with code to copy and paste into our web page.

Video-embedding code might not be XHTML valid, requiring us to make changes before the page will pass validation.

Page 3: Embedding Videos. Adding Videos to Our Website: Videos can make our pages more interesting and engaging. Most video-hosting websites, such as YouTube,

Embedding a YouTube Video:

To place a YouTube video into your web

page, go to the video on YouTube and click on the Share button.

Page 4: Embedding Videos. Adding Videos to Our Website: Videos can make our pages more interesting and engaging. Most video-hosting websites, such as YouTube,

Embedding a YouTube Video:

Next, click on the Embed button that

appears.

Page 5: Embedding Videos. Adding Videos to Our Website: Videos can make our pages more interesting and engaging. Most video-hosting websites, such as YouTube,

Embedding a YouTube Video:

Choose your window size or specify your

own dimensions.

Once you have specified the window size, copy and paste this code into your XHTML document.

Page 6: Embedding Videos. Adding Videos to Our Website: Videos can make our pages more interesting and engaging. Most video-hosting websites, such as YouTube,

YouTube Video Example:<body><h1>Example of Embedding a YouTube Video</h1><iframe width="480" height="390"

src="http://www.youtube.com/embed/nFoidIMqWGY?rel=0" frameborder="0" allowfullscreen></iframe>

<h2>This heading should appear below the embedded video.</h2></body>

If you wish to resize the video window on your page, you don't need to go back to YouTube and repeat the process. Just edit the

dimensions in the code, making sure to keep the same

width-to-height ratio.

Page 7: Embedding Videos. Adding Videos to Our Website: Videos can make our pages more interesting and engaging. Most video-hosting websites, such as YouTube,

Making the YouTube Code Validate:

<body><h1>Example of Embedding a YouTube Video</h1><iframe width="480" height="390"

src="http://www.youtube.com/embed/nFoidIMqWGY?rel=0" frameborder="0" allowfullscreen></iframe>

<h2>This heading should appear below the embedded video.</h2></body>

Attempting to validate this page results in the above error. We can fix this simply by deleting "allowfullscreen" from the code. This has no

difference to how our page looks but our page will now pass validation.