Which tag is used to specify multiple media resources for media elements like video and audio?

Prepare for the Web Design EOPA Test. Study with interactive quizzes and multiple-choice questions, complete with hints and detailed explanations. Get ready for your web design certification!

Multiple Choice

Which tag is used to specify multiple media resources for media elements like video and audio?

Explanation:
Using multiple media resources for a video or audio element is done with the source element inside the media tag. Each source element points to a different file and can specify its type, so the browser can choose the first one it can play. This is how you provide formats like WebM and MP4 to maximize compatibility across browsers. The browser will automatically try the sources in order and fall back to the next one if the current isn’t supported, showing fallback text if none work. Other tags serve different roles: the link tag links external resources to the document (such as stylesheets), the script tag loads JavaScript, and the meta tag provides metadata about the page. They aren’t used to supply alternative media formats for playback. Example: <video controls> <source src="movie.webm" type="video/webm"> <source src="movie.mp4" type="video/mp4"> Your browser does not support HTML5 video. </video>

Using multiple media resources for a video or audio element is done with the source element inside the media tag. Each source element points to a different file and can specify its type, so the browser can choose the first one it can play. This is how you provide formats like WebM and MP4 to maximize compatibility across browsers. The browser will automatically try the sources in order and fall back to the next one if the current isn’t supported, showing fallback text if none work.

Other tags serve different roles: the link tag links external resources to the document (such as stylesheets), the script tag loads JavaScript, and the meta tag provides metadata about the page. They aren’t used to supply alternative media formats for playback.

Example:

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy