<source> tag could work well in all media tags e.g <img>, <video>, <audio> and so on?

If audio tag and video tag works well with a nested source tag, so it could work well in all media tags like img tag and so on?

Lesson: https://www.codecademy.com/courses/learn-html/lessons/semantic-html/exercises/audio-and-attributes

Great day.

The <source> element is used inside a <picture> element to indicate different versions of the same image (perhaps of different size). It is not used with just the <img> element, but must be contained by a parent.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source

1 Like