Presentation is loading. Please wait.

Presentation is loading. Please wait.

Embedding Videos.

Similar presentations


Presentation on theme: "Embedding Videos."— Presentation transcript:

1 Embedding Videos

2 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.

3 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.

4 Embedding a YouTube Video:
Next, click on the Embed button that appears.

5 Embedding a YouTube Video:
Once you have specified the window size, copy and paste this code into your XHTML document. Choose your window size or specify your own dimensions.

6 YouTube Video Example:
<body> <h1>Example of Embedding a YouTube Video</h1> <iframe width="480" height="390" src=" 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.

7 Making the YouTube Code Validate:
<body> <h1>Example of Embedding a YouTube Video</h1> <iframe width="480" height="390" src=" 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.


Download ppt "Embedding Videos."

Similar presentations


Ads by Google