Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
The video element allows us to embed video files into an HTML, very similar to the way images can be added.
HTML Elements
- <video> - The video element allows webpages to play video files inline with other content.
Resources
Video and Audio URLs
Here are the video and audio files used in this course. There is no need to download these files; they are just listed here so that you can easily copy these URLs into your code.
- http://treehouse-code-samples.s3.amazonaws.com/html-video-and-audio/bridge.mp4
- http://treehouse-code-samples.s3.amazonaws.com/html-video-and-audio/bridge.ogg
- http://treehouse-code-samples.s3.amazonaws.com/html-video-and-audio/bridge-audio.mp3
Playing Video and Audio Locally
If you choose not to use Workspaces for this course, you'll need to follow these instructions. Otherwise you can ignore them.
When playing video and audio files locally that come from a remote source, the same-origin policy requires a web server to be running.
There are many ways to do this on both Mac and PC, but one of the easiest ways is to install an all-in-one application like MAMP.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up