Videos
In the previous exercises, we made our page more engaging with an image. Now let's look at another important element: video. Unlike an image, a video has an opening tag, a closing tag and content.
<video src="video-address" controls>
Video not supported.
</video>The video element also uses the src attribute, whose value is the address of the video, just like with images.
Next, we see the controls attribute, which has no value. It is a so-called boolean attribute: it is either on or off. When the element has it, it is on, and the browser shows buttons for controlling the video (play, volume and so on). When the attribute is missing, it is off, and there are no buttons.
The last thing to notice is the text inside the element, Video not supported. Browsers that can play video ignore it, and only a browser that can't play video at all shows it. Today, there are practically no such browsers, so you won't see this text. It doesn't appear even when the video fails to load.
Instructions
Above the Source link, create a video element with the src attribute set to /learn/html/cats-playing.webm.
Add the controls attribute to the video, so that it can be controlled.
Inside the video element, write the text Video not supported.
Start programming for free
7/12