Specifying the Video Source (and Format)
The src attribute specifies the URL for the video file.
<!DOCTYPE HTML>
<html>
<head>
<title>Example</title>
</head>
<body>
<video src="yourVideo.webm" controls width="360" height="240">
Video cannot be displayed
</video>
</body>
</html>
The following tabls lists video formats with significant browser support
Format | Description | Support |
---|---|---|
WebM | backed by Google | Opera Chrome Firefox |
Ogg/Theora | Ogg Theora is an open, royalty-free, and patent-free format. | Opera Chrome Firefox |
MP4/H.264 | free to use until 2015. | Internet Explorer Chrome Safari |
Home
HTML CSS Book
HTML
HTML CSS Book
HTML
video:
- Using the video Element
- Preloading the Video
- Displaying a Placeholder Image
- Setting the Video Size
- Specifying the Video Source (and Format)
- The source Element
- The track Element
Related: