What is the significance of the type attribute in a source tag within an audio or video tag?

  • It defines the media file's MIME type. 
  • It provides an alternative text for the media. 
  • It sets the autoplay behavior. 
  • It specifies the order of playback. 
The type attribute in a source tag within an audio or video tag specifies the media file's MIME type, such as "video/mp4" or "audio/mp3". This informs the browser about the file format and potentially helps it select the most appropriate source when there are multiple source tags provided. This enhances compatibility as different browsers may support different file formats. 
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *