HTML5 Multiple choices


Total available count: 25
Subject - Web Development
Subsubject - HTML5

What is the correct HTML5 element for playing audio files?


 

 

 

 



C


Solution:-

The Embed Audio element:-

The HTML <audio> element is used to embed sound content in documents. It may contain one or more audio sources, represented using the src attribute or the <source> element: the browser will choose the most suitable one. It can also be the destination for streamed media, using a MediaStream.

<figure>
  <figcaption>Listen to the T-Rex:</figcaption>
  <audio
    controls
    src="/media/cc0-audio/t-rex-roar.mp3">
      Your browser does not support the
      <code>audio</code> element.
  </audio>
</figure>

The above example shows the simple usage of the <audio> element. In a similar manner to the <img> element, we include a path to the media we want to embed inside the src attribute; we can include other attributes to specify information such as whether we want it to autoplay and loop, whether we want to show the browser's default audio controls, etc.

The content inside the opening and closing <audio></audio> tags is shown as a fallback in browsers that don't support the element.




Next 5 multiple choice(s)

1

Which attribute for <script> elements is no longer required in HTML5?

2

In HTML5, which method is used to get the current location of a user?

3

The new HTML5 global attribute, "contenteditable" is used to:

4

In HTML5, contextmenu and spellcheck are:

5

In HTML5, you can embed SVG elements directly into an HTML page.

Comments