<video>
and <audio>
elements and the availability of JavaScript APIs for controlling them. https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Video_and_audio_contentsrc
and controls
attributes in the <video>
element.
src
- In the same way as for the <img>
element, the src (source) attribute contains a path to the video you want to embed.controls
- Users must be able to control video and audio playback. You must either use the controls attribute to include the browser’s own control interface, or build your interface using the appropriate JavaScript API.https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Video_and_audio_content
<video>
element?
<video>
element, allowing us to provide a fallback for older browsers. This can be anything you like; in this case, we’ve provided a direct link to the video file, so the user can at least access it some way regardless of what browser they are using.https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Video_and_audio_content
<audio>
and <video>
are characters.
<audio>
and <video>
are best friends and provide pure joy to everyone they meet.display: grid
is applied. It’s the direct parent of all the grid items. In this example container is the grid container.item
elements are grid items, but sub-item
isn’t.<img>
attributes srcset
and sizes
. Write an example of how they are used.
srcset
- defines the set of images we will allow the browser to choose between, and what size each image is. Each set of image information is separated from the previous one by a comma.sizes
- defines a set of media conditions (e.g. screen widths) and indicates what image size would be best to choose, when certain media conditions are true.https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images
``` <img srcset=”elva-fairy-480w.jpg 480w, elva-fairy-800w.jpg 800w” sizes=”(max-width: 600px) 480px, 800px; src=”elva-fairy-800w.jpg” alt=”Elva dressed as a fairy” />
srcset
more helpful for responsive images than CSS or JavaScript?